Crate nstd_audio[−][src]
Structs
Represents an audio play stream.
Represents a stream config.
NOTE: buffer_size will be set to 0 for default.
Enums
Represents an audio sample format.
Functions
Frees a device.
Parameters:
NSTDAudioDevice *device - Pointer to a device.
Frees a device name.
Parameters:
const char **name - A device name.
Gets the name of a device.
Parameters:
NSTDAudioDevice device - The device.
Returns: char *name - The device name.
Gets the default audio host.
Returns: NSTDAudioHost host - The default audio host.
Frees a host’s memory.
Parameters:
NSTDAudioHost *host - Pointer to an audio host.
Frees a play stream.
Parameters:
NSTDAudioPlayStream *stream - The play stream.
Creates a play stream.
Returns: NSTDAudioPlayStream stream - The new play stream.
Appends audio to a sink from a file.
Parameters:
NSTDAudioSink sink - The audio sink.
NSTDFile file - The audio file.
const int should_loop - Nonzero if the audio should be looped.
Returns: int errc - Nonzero on error.
Detaches a sink from it’s thread while freeing its memory.
Parameters:
NSTDAudioSink *sink - The audio sink.
Frees an audio sink.
Parameters:
NSTDAudioSink *sink - The audio sink.
Returns the volume of the audio sink.
Parameters:
NSTDAudioSink sink - The audio sink.
Returns: float volume - The volume of the sink.
Checks if an audio sink is paused.
Parameters:
NSTDAudioSink sink - The audio sink.
Returns: int is_paused - Whether or not the audio sink is paused.
Gets the number of audio sources currently in a sink.
Parameters:
NSTDAudioSink sink - The audio sink.
Returns: NSTDUSize size - The number of audio sources in an audio sink.
Creates a new audio sink.
Parameters:
const NSTDAudioPlayStream *const stream - The stream to create the sink on.
Returns: NSTDAudioSink sink - The new audio sink.
Pauses an audio sink.
Parameters:
NSTDAudioSink sink - The audio sink.
Plays an audio sink.
Parameters:
NSTDAudioSink sink - The audio sink.
Sets the volume of the audio sink.
Parameters:
NSTDAudioSink sink - The audio sink.
const float volume - The volume of the sink.
Sleeps the current thread until all sounds in the sink are done playing.
Parameters:
NSTDAudioSink sink - The audio sink.
Stops audio playback for a sink by clearing it’s queue.
Parameters:
NSTDAudioSink sink - The audio sink.
Frees an audio stream
Parameters:
NSTDAudioStream *stream - Pointer to an audio stream.
Type Definitions
Represents an audio device.
Represents an audio host.
Represents an audio sink.
Represents an audio stream.
