moonbase.audio functions - Protovision/moonbase GitHub Wiki
moonbase.audio.getAudioChannels( )
Returns the number of audio channels in output; 2 for stereo, 1 for mono
moonbase.audio.getFormat( )
Returns a number representing the format of the audio samples. These values are based on the AUDIO_* macros defined in SDL_audio.h
moonbase.audio.getFrequency( )
Returns the output sampling frequency in samples per second (Hz)
moonbase.audio.getSamples( )
Returns the bytes used per output sample
moonbase.audio.getSoundChannels( )
Returns the number of sound channels being mixed
moonbase.audio.getVolume( )
Returns a normalized number representing the average volume of all sound channels
moonbase.audio.pause( )
Pauses all sound channels
moonbase.audio.restart( )
Restarts moonbase.audio, applying any changes made to the format, frequency, samples, or audio channels
moonbase.audio.resume( )
Resumes all sound channels after a moonbase.audio.pause( )
moonbase.audio.setAudioChannels( audioChannels )
Sets the number of audio channels in output; 2 for stereo, 1 for mono. Call moonbase.audio.restart( ) to apply changes
moonbase.audio.setFormat( format )
Sets the format of the audio samples. This number is based on the AUDIO_* macros defined in SDL_audio.h. Call moonbase.audio.restart( ) to apply changes
moonbase.audio.setFrequency( frequency )
Sets the the output sampling frequency in samples per second (Hz). Call moonbase.audio.restart( ) to apply changes
moonbase.audio.setSamples( samples )
Sets the bytes used per sample. Call moonbase.audio.restart( ) to apply changes
moonbase.audio.setSoundChannels( channels )
Sets the number of sound channels beings mixed
moonbase.audio.setVolume( volume )
Sets the average volume of all sound channels. volume is a normalized number from 0.0 to 1.0.