- computeFunc
double computeFunc(float x, FuncDef* func)
Undocumented in source. Be warned that the author may not have intended to support it.
- cubicCoef
void cubicCoef(float frac, float* interp)
Undocumented in source. Be warned that the author may not have intended to support it.
- gcd
uint gcd(uint a, uint b)
Undocumented in source. Be warned that the author may not have intended to support it.
- main
void main()
Undocumented in source. Be warned that the author may not have intended to support it.
- midiChannelAftertouch
ubyte[] midiChannelAftertouch(ubyte[] where, ubyte channel, byte amount)
- midiNoteAftertouch
ubyte[] midiNoteAftertouch(ubyte[] where, ubyte channel, byte note, byte pressure)
- midiNoteController
ubyte[] midiNoteController(ubyte[] where, ubyte channel, byte controllerNumber, byte controllerValue)
- midiNoteOff
ubyte[] midiNoteOff(ubyte[] where, ubyte channel, byte note, byte velocity)
- midiNoteOn
ubyte[] midiNoteOn(ubyte[] where, ubyte channel, byte note, byte velocity)
Puts a note on at the beginning of the passed slice, advancing it by the amount of the message size.
Returns the message slice.
- midiNotePitchBend
ubyte[] midiNotePitchBend(ubyte[] where, ubyte channel, short change)
Pitch bend. FIXME doesn't work right
- midiProgramChange
ubyte[] midiProgramChange(ubyte[] where, ubyte channel, byte program)
- openAlsaPcm
snd_pcm_t* openAlsaPcm(snd_pcm_stream_t direction, int SampleRate, int channels, string cardName)
Undocumented in source. Be warned that the author may not have intended to support it.
- resamplerBasicDirect
int resamplerBasicDirect(SpeexResampler st, uint chanIdx, const(float)* indata, uint* indataLen, float* outdata, uint* outdataLen)
Undocumented in source. Be warned that the author may not have intended to support it.
- resamplerBasicInterpolate
int resamplerBasicInterpolate(SpeexResampler st, uint chanIdx, const(float)* indata, uint* indataLen, float* outdata, uint* outdataLen)
Undocumented in source. Be warned that the author may not have intended to support it.
- restoreSigIntHandler
void restoreSigIntHandler()
Undocumented in source. Be warned that the author may not have intended to support it.
- setSigIntHandler
void setSigIntHandler()
Undocumented in source. Be warned that the author may not have intended to support it.
- silence_alsa_messages
void silence_alsa_messages()
Undocumented in source. Be warned that the author may not have intended to support it.
- sinc
float sinc(float cutoff, float x, int N, FuncDef* windowFunc)
Undocumented in source. Be warned that the author may not have intended to support it.
- snd_lib_error_set_handler
int snd_lib_error_set_handler(snd_lib_error_handler_t handler)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_attach
int snd_mixer_attach(snd_mixer_t* , char* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_close
int snd_mixer_close(snd_mixer_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_elem_set_callback
void snd_mixer_elem_set_callback(snd_mixer_elem_t* , snd_mixer_elem_callback_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_find_selem
snd_mixer_elem_t* snd_mixer_find_selem(snd_mixer_t* , snd_mixer_selem_id_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_handle_events
int snd_mixer_handle_events(snd_mixer_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_load
int snd_mixer_load(snd_mixer_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_open
int snd_mixer_open(snd_mixer_t** , int mode)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_poll_descriptors
int snd_mixer_poll_descriptors(snd_mixer_t* , pollfd* , uint space)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_get_playback_switch
int snd_mixer_selem_get_playback_switch(snd_mixer_elem_t* , int , int* value)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_get_playback_volume
int snd_mixer_selem_get_playback_volume(snd_mixer_elem_t* , int , c_long* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_get_playback_volume_range
int snd_mixer_selem_get_playback_volume_range(snd_mixer_elem_t* , c_long* , c_long* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_id_free
void snd_mixer_selem_id_free(snd_mixer_selem_id_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_id_malloc
int snd_mixer_selem_id_malloc(snd_mixer_selem_id_t** )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_id_set_index
void snd_mixer_selem_id_set_index(snd_mixer_selem_id_t* , uint )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_id_set_name
void snd_mixer_selem_id_set_name(snd_mixer_selem_id_t* , char* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_register
int snd_mixer_selem_register(snd_mixer_t* , void* , void* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_set_playback_switch_all
int snd_mixer_selem_set_playback_switch_all(snd_mixer_elem_t* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_mixer_selem_set_playback_volume_all
int snd_mixer_selem_set_playback_volume_all(snd_mixer_elem_t* , c_long )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_avail
snd_pcm_sframes_t snd_pcm_avail(snd_pcm_t* pcm)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_avail_update
snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t* pcm)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_close
int snd_pcm_close(snd_pcm_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params
int snd_pcm_hw_params(snd_pcm_t* , snd_pcm_hw_params_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_any
int snd_pcm_hw_params_any(snd_pcm_t* , snd_pcm_hw_params_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_free
void snd_pcm_hw_params_free(snd_pcm_hw_params_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_malloc
int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t** )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_access
int snd_pcm_hw_params_set_access(snd_pcm_t* , snd_pcm_hw_params_t* , snd_pcm_access_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_buffer_size
int snd_pcm_hw_params_set_buffer_size(snd_pcm_t* , snd_pcm_hw_params_t* , snd_pcm_uframes_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_buffer_size_near
int snd_pcm_hw_params_set_buffer_size_near(snd_pcm_t* , snd_pcm_hw_params_t* , snd_pcm_uframes_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_channels
int snd_pcm_hw_params_set_channels(snd_pcm_t* , snd_pcm_hw_params_t* , uint )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_format
int snd_pcm_hw_params_set_format(snd_pcm_t* , snd_pcm_hw_params_t* , snd_pcm_format )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_periods
int snd_pcm_hw_params_set_periods(snd_pcm_t* , snd_pcm_hw_params_t* , uint , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_periods_near
int snd_pcm_hw_params_set_periods_near(snd_pcm_t* , snd_pcm_hw_params_t* , uint* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_hw_params_set_rate_near
int snd_pcm_hw_params_set_rate_near(snd_pcm_t* , snd_pcm_hw_params_t* , uint* , int* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_open
int snd_pcm_open(snd_pcm_t** , char* , snd_pcm_stream_t , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_pause
int snd_pcm_pause(snd_pcm_t* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_prepare
int snd_pcm_prepare(snd_pcm_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_readi
snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t* , void* , snd_pcm_uframes_t size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_recover
int snd_pcm_recover(snd_pcm_t* pcm, int err, int silent)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_sw_params
int snd_pcm_sw_params(snd_pcm_t* pcm, snd_pcm_sw_params_t* params)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_sw_params_current
int snd_pcm_sw_params_current(snd_pcm_t* pcm, snd_pcm_sw_params_t* params)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_sw_params_free
void snd_pcm_sw_params_free(snd_pcm_sw_params_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_sw_params_malloc
int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t** )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_sw_params_set_avail_min
int snd_pcm_sw_params_set_avail_min(snd_pcm_t* , snd_pcm_sw_params_t* , snd_pcm_uframes_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_sw_params_set_start_threshold
int snd_pcm_sw_params_set_start_threshold(snd_pcm_t* , snd_pcm_sw_params_t* , snd_pcm_uframes_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_sw_params_set_stop_threshold
int snd_pcm_sw_params_set_stop_threshold(snd_pcm_t* , snd_pcm_sw_params_t* , snd_pcm_uframes_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_wait
int snd_pcm_wait(snd_pcm_t* pcm, int timeout)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_pcm_writei
snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t* , void* , snd_pcm_uframes_t size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_rawmidi_close
int snd_rawmidi_close(snd_rawmidi_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_rawmidi_drain
int snd_rawmidi_drain(snd_rawmidi_t* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_rawmidi_open
int snd_rawmidi_open(snd_rawmidi_t** , snd_rawmidi_t** , char* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_rawmidi_read
ssize_t snd_rawmidi_read(snd_rawmidi_t* , void* , size_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_rawmidi_write
ssize_t snd_rawmidi_write(snd_rawmidi_t* , void* , size_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- snd_strerror
const(char)* snd_strerror(int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
The purpose of this module is to provide audio functions for things like playback, capture, and volume on both Windows (via the mmsystem calls) and Linux (through ALSA).
It is only aimed at the basics, and will be filled in as I want a particular feature. I don't generally need super configurability and see it as a minus, since I don't generally care either, so I'm going to be going for defaults that just work. If you need more though, you can hack the source or maybe just use it for the operating system bindings.
For example, I'm starting this because I want to write a volume control program for my linux box, so that's what is going first. That will consist of a listening callback for volume changes and being able to get/set the volume.
TODO: * pre-resampler that loads a clip and prepares it for repeated fast use * controls so you can tell a particular thing to keep looping until you tell it to stop, or stop after the next loop, etc (think a phaser sound as long as you hold the button down) * playFile function that detects automatically. basically: if(args[1].endsWith("ogg")) a.playOgg(args[1]); else if(args[1].endsWith("wav")) a.playWav(args[1]); else if(mp3) a.playMp3(args[1]);