Crate nstd_audio

Source

Structs§

NSTDAudioPlayStream
Represents an audio play stream.
NSTDAudioStreamConfig
Represents a stream config. NOTE: buffer_size will be set to 0 for default.

Enums§

NSTDAudioSampleFormat
Represents an audio sample format.

Functions§

nstd_audio_device_build_input_stream
nstd_audio_device_build_output_stream
nstd_audio_device_default_input_config
nstd_audio_device_default_output_config
nstd_audio_device_free
Frees a device. Parameters: NSTDAudioDevice *device - Pointer to a device.
nstd_audio_device_free_name
Frees a device name. Parameters: const char **name - A device name.
nstd_audio_device_name
Gets the name of a device. Parameters: NSTDAudioDevice device - The device. Returns: char *name - The device name.
nstd_audio_host_default
Gets the default audio host. Returns: NSTDAudioHost host - The default audio host.
nstd_audio_host_default_input_device
nstd_audio_host_default_output_device
nstd_audio_host_free
Frees a host’s memory. Parameters: NSTDAudioHost *host - Pointer to an audio host.
nstd_audio_play_stream_free
Frees a play stream. Parameters: NSTDAudioPlayStream *stream - The play stream.
nstd_audio_play_stream_new
Creates a play stream. Returns: NSTDAudioPlayStream stream - The new play stream.
nstd_audio_sink_append_from_file
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.
nstd_audio_sink_detach
Detaches a sink from it’s thread while freeing its memory. Parameters: NSTDAudioSink *sink - The audio sink.
nstd_audio_sink_free
Frees an audio sink. Parameters: NSTDAudioSink *sink - The audio sink.
nstd_audio_sink_get_volume
Returns the volume of the audio sink. Parameters: NSTDAudioSink sink - The audio sink. Returns: float volume - The volume of the sink.
nstd_audio_sink_is_paused
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.
nstd_audio_sink_length
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.
nstd_audio_sink_new
Creates a new audio sink. Parameters: const NSTDAudioPlayStream *const stream - The stream to create the sink on. Returns: NSTDAudioSink sink - The new audio sink.
nstd_audio_sink_pause
Pauses an audio sink. Parameters: NSTDAudioSink sink - The audio sink.
nstd_audio_sink_play
Plays an audio sink. Parameters: NSTDAudioSink sink - The audio sink.
nstd_audio_sink_set_volume
Sets the volume of the audio sink. Parameters: NSTDAudioSink sink - The audio sink. const float volume - The volume of the sink.
nstd_audio_sink_sleep_until_end
Sleeps the current thread until all sounds in the sink are done playing. Parameters: NSTDAudioSink sink - The audio sink.
nstd_audio_sink_stop
Stops audio playback for a sink by clearing it’s queue. Parameters: NSTDAudioSink sink - The audio sink.
nstd_audio_stream_free
Frees an audio stream Parameters: NSTDAudioStream *stream - Pointer to an audio stream.
nstd_audio_stream_pause
nstd_audio_stream_play

Type Aliases§

NSTDAudioDevice
Represents an audio device.
NSTDAudioHost
Represents an audio host.
NSTDAudioSink
Represents an audio sink.
NSTDAudioStream
Represents an audio stream.