ISoundFX. More...
ISoundFX.
Sound,music and FX effects interface.
Public Member Functions | |
| void | AllocateChannels (int nch) |
| Dinamic change of channels. | |
| int | ChannelFadeIn (int ch, int hndSound, int loops, int ms) |
| Channel fade in. | |
| int | ChannelFadeOut (int ch, int ms) |
| Channel fade out. | |
| int | ChannelIsPaused (int ch) |
| Query if a channel is paused. | |
| void | ChannelPause (int ch) |
| Channel pause. | |
| void | ChannelResume (int ch) |
| Channel resume. | |
| void | ChannelStop (int ch) |
| Channel stop. | |
| void | ChannelVolume (int ch, int vol) |
| Channel volumen control. | |
| unsigned char | Export (int idDPF, char *namesnd, char m, char *s=NULL) |
| Exporting audio from a DPF(using an idDPF) to an external file. | |
| unsigned char | Export (char *fileDPF, char *namesnd, char m, char *s=NULL) |
| Exporting audio from a DPF(using a filename) to an external file. | |
| unsigned char | Init () |
| Try to initialize sound system according to CRM32Pro.Config. | |
| unsigned char | Init (int frequency, unsigned short format, int channels, int chunksize) |
| Initialize sound system. | |
| int | Initialized () |
| Was sound system activated? | |
| int | IsPlaying (int ch) |
| Check is playing a channel. | |
| int | IsPlaying (void) |
| Check is playing music. | |
| int | MusicFadeIn (int hndMusic, int loops, int ms) |
| Music fade in. | |
| int | MusicFadeOut (int ms) |
| Music fade out. | |
| void | MusicFree (int hndMusic) |
| Free a music. | |
| int | MusicImport (int idDPF, char *namemus, char *filemus) |
| Save a XM,IT,MOD,S3M or OGG music to DPF file(using idDPF) from external file. | |
| int | MusicImport (char *fileDPF, char *namemus, char *filemus) |
| Save a XM,IT,MOD,S3M or OGG music to DPF file(using filename) from external file. | |
| unsigned char | MusicInfo (int idDPF, char *namemus, sAudioType *mustype) |
| Get information about given music track stored on DPF(using an idDPF) or file. Only supports OGG,XM,MOD,IT and S3M. | |
| unsigned char | MusicInfo (char *fileDPF, char *namemus, sAudioType *mustype) |
| Get information about given music track stored on DPF(using an idDPF) or file. Only supports OGG,XM,MOD,IT and S3M. | |
| int | MusicIsPaused (void) |
| Query if music is paused. | |
| int | MusicLoad (int idDPF, char *musname) |
| Load XM,IT,S3M,MOD and OGG music from DPF file(using an idDPF). | |
| int | MusicLoad (char *fileDPF, char *musname) |
| Load XM,IT,S3M,MOD and OGG music from DPF file(using a filename). | |
| int | MusicLoad (const char *f) |
| Load XM,IT,S3M,MOD and OGG music from external file. | |
| void | MusicPause (void) |
| Pause music. | |
| int | MusicPlay (int hndMusic, int loops) |
| Play a music track (XM,S3M,MOD,IT or OGG). | |
| void | MusicResume (void) |
| Resume music. | |
| void | MusicRewind (void) |
| Rewind music. | |
| void | MusicStop (void) |
| Music stop. | |
| void | MusicVolume (int vol) |
| Music volume control. | |
| void | NoInit () |
| Turn off sound output. | |
| void | QuerySpec (int *freq, unsigned short *format, int *ch) |
| Query sound system features. | |
| void | Quit (void) |
| Close sound system. | |
| void | SoundFree (int hndSound) |
| Free a sound. | |
| int | SoundImport (int idDPF, char *namesnd, char *filesnd) |
| Save a WAV,VOC,AIFF and OGG sound to DPF(using an idDPF) file from external file. | |
| int | SoundImport (char *fileDPF, char *namesnd, char *filesnd) |
| Save a WAV,VOC,AIFF and OGG sound to DPF(using a filename) file from external file. | |
| unsigned char | SoundInfo (int idDPF, char *namesnd, sAudioType *sndtype) |
| Get information about given sound stored on DPF(an idDPF) or file. Only supports WAV,VOC,AIFF and OGG. | |
| unsigned char | SoundInfo (char *fileDPF, char *namesnd, sAudioType *sndtype) |
| Get information about given sound stored on DPF or file. Only supports WAV,VOC,AIFF and OGG. | |
| int | SoundLoad (int idDPF, char *namesnd) |
| Load WAV,VOC,AIFF and OGG sound from DPF(using an idDPF) file. | |
| int | SoundLoad (char *fileDPF, char *namesnd) |
| Load WAV,VOC,AIFF and OGG sound from DPF(using a filename) file. | |
| int | SoundLoad (const char *f) |
| Load WAV,VOC,AIFF and OGG sound from external file. | |
| void | SoundPlay (int ch, int hndSound, int loops) |
| Play a sound. | |
| void | SoundVolume (int hndSound, int vol) |
| Sound volume control. | |
| int CRM32Pro_ISoundFX::ChannelFadeIn | ( | int | ch, | |
| int | hndSound, | |||
| int | loops, | |||
| int | ms | |||
| ) |
Channel fade in.
| ch | channel to fade in | |
| hndSound | sound handle to play | |
| loops | play times, 0 unlimited | |
| ms | time in milliseconds |
| int CRM32Pro_ISoundFX::ChannelFadeOut | ( | int | ch, | |
| int | ms | |||
| ) |
Channel fade out.
| ch | channel to fade out | |
| ms | time in milliseconds |
| int CRM32Pro_ISoundFX::ChannelIsPaused | ( | int | ch | ) |
Query if a channel is paused.
| ch | channel to query its state |
| void CRM32Pro_ISoundFX::ChannelPause | ( | int | ch | ) |
Channel pause.
| ch | channel to pause |
| void CRM32Pro_ISoundFX::ChannelResume | ( | int | ch | ) |
Channel resume.
| ch | channel to resume |
| void CRM32Pro_ISoundFX::ChannelStop | ( | int | ch | ) |
Channel stop.
| ch | channel to stop |
| void CRM32Pro_ISoundFX::ChannelVolume | ( | int | ch, | |
| int | vol | |||
| ) |
Channel volumen control.
| ch | channel to adjust the volumen. -1 will set the volume for all allocated channels. | |
| vol | volumen from 0 to 255 |
| unsigned char CRM32Pro_ISoundFX::Export | ( | int | idDPF, | |
| char * | namesnd, | |||
| char | m, | |||
| char * | s = NULL | |||
| ) |
Exporting audio from a DPF(using an idDPF) to an external file.
| idDPF | ID of the opened DPF | |
| namesnd | name of the sound or music. If it has '/' or '\', it will create the path. | |
| m | 0 if it is a sound and 1 if it is a music. | |
| s | by default, is NULL. Use it if you want to change the file name (an optional path) of output file. |
| unsigned char CRM32Pro_ISoundFX::Export | ( | char * | fileDPF, | |
| char * | namesnd, | |||
| char | m, | |||
| char * | s = NULL | |||
| ) |
Exporting audio from a DPF(using a filename) to an external file.
| fileDPF | DPF file that contains the audio(sound or music) | |
| namesnd | name of the sound or music. If it has '/' or '\', it will create the path. | |
| m | 0 if it is a sound and 1 if it is a music. | |
| s | by default, is NULL. Use it if you want to change the file name (an optional path) of output file. |
| unsigned char CRM32Pro_ISoundFX::Init | ( | ) |
Try to initialize sound system according to CRM32Pro.Config.
| unsigned char CRM32Pro_ISoundFX::Init | ( | int | frequency, | |
| unsigned short | format, | |||
| int | nchannels, | |||
| int | chunksize | |||
| ) |
Initialize sound system.
| frequency | frequency in Hz (11025,22050,44200) | |
| format | AUDIO_S8 to 8bits or AUDIO_S16 to 16bits sound resolution | |
| nchannels | 1 for mono, 2 for stereo, 4 for surround and 6 for surround with center and lfe | |
| chunksize | buffer size, use 4096 for normal operation |
| int CRM32Pro_ISoundFX::Initialized | ( | ) |
Was sound system activated?
| int CRM32Pro_ISoundFX::IsPlaying | ( | int | ch | ) |
Check is playing a channel.
| ch | channel to check |
| int CRM32Pro_ISoundFX::IsPlaying | ( | void | ) |
Check is playing music.
| int CRM32Pro_ISoundFX::MusicFadeIn | ( | int | hndMusic, | |
| int | loops, | |||
| int | ms | |||
| ) |
Music fade in.
| hndMusic | music handle to play | |
| loops | play times, 0 unlimited | |
| ms | time in milliseconds |
| int CRM32Pro_ISoundFX::MusicFadeOut | ( | int | ms | ) |
| void CRM32Pro_ISoundFX::MusicFree | ( | int | hndMusic | ) |
| int CRM32Pro_ISoundFX::MusicImport | ( | int | idDPF, | |
| char * | namemus, | |||
| char * | filemus | |||
| ) |
Save a XM,IT,MOD,S3M or OGG music to DPF file(using idDPF) from external file.
| idDPF | ID of the opened DPF | |
| namemus | music name | |
| filemus | external file with the original music |
| int CRM32Pro_ISoundFX::MusicImport | ( | char * | fileDPF, | |
| char * | namemus, | |||
| char * | filemus | |||
| ) |
Save a XM,IT,MOD,S3M or OGG music to DPF file(using filename) from external file.
| fileDPF | DPF file to store the music | |
| namemus | music name | |
| filemus | external file with the original music |
| unsigned char CRM32Pro_ISoundFX::MusicInfo | ( | int | idDPF, | |
| char * | namemus, | |||
| sAudioType * | mustype | |||
| ) |
Get information about given music track stored on DPF(using an idDPF) or file. Only supports OGG,XM,MOD,IT and S3M.
| idDPF | ID of the opened DPF | |
| namemus | if idDPF is 0, this is the name of external file. Otherwise, this is music name | |
| mustype | pointer to sAudioType |
| unsigned char CRM32Pro_ISoundFX::MusicInfo | ( | char * | fileDPF, | |
| char * | namemus, | |||
| sAudioType * | mustype | |||
| ) |
Get information about given music track stored on DPF(using an idDPF) or file. Only supports OGG,XM,MOD,IT and S3M.
| fileDPF | DPF file to look for the music | |
| namemus | if "fileDPF" is NULL, this is the name of external file. Otherwise, this is music name | |
| mustype | pointer to sAudioType |
| int CRM32Pro_ISoundFX::MusicIsPaused | ( | void | ) |
Query if music is paused.
| int CRM32Pro_ISoundFX::MusicLoad | ( | int | idDPF, | |
| char * | namemus | |||
| ) |
Load XM,IT,S3M,MOD and OGG music from DPF file(using an idDPF).
| idDPF | ID of the opened DPF | |
| namemus | music name |
| int CRM32Pro_ISoundFX::MusicLoad | ( | char * | fileDPF, | |
| char * | namemus | |||
| ) |
Load XM,IT,S3M,MOD and OGG music from DPF file(using a filename).
| fileDPF | DPF file that contains the music | |
| namemus | music name |
| int CRM32Pro_ISoundFX::MusicLoad | ( | const char * | fname | ) |
Load XM,IT,S3M,MOD and OGG music from external file.
| fname | file that contains the music |
| int CRM32Pro_ISoundFX::MusicPlay | ( | int | hnd, | |
| int | loops | |||
| ) |
Play a music track (XM,S3M,MOD,IT or OGG).
| hnd | music handle the sound | |
| loops | number of play times, 0 means forever. |
| void CRM32Pro_ISoundFX::MusicVolume | ( | int | vol | ) |
Music volume control.
| vol | volume from 0 to 255 |
| void CRM32Pro_ISoundFX::QuerySpec | ( | int * | freq, | |
| unsigned short * | format, | |||
| int * | ch | |||
| ) |
Query sound system features.
| freq | pointer to integer to get the frequency in Hz (11025,22050,44200) | |
| format | pointer to Uint16 to get the sound resolution (8bits or 16bits) | |
| ch | pointer to integer to get 0 to mono or 1 to stereo |
| void CRM32Pro_ISoundFX::Quit | ( | void | ) |
Close sound system.
Close the sound system.
| void CRM32Pro_ISoundFX::SoundFree | ( | int | hndSound | ) |
Free a sound.
| hndSound | sound handle to be deleted |
| int CRM32Pro_ISoundFX::SoundImport | ( | int | idDPF, | |
| char * | namesnd, | |||
| char * | filesnd | |||
| ) |
Save a WAV,VOC,AIFF and OGG sound to DPF(using an idDPF) file from external file.
| idDPF | ID of the opened DPF | |
| namesnd | sound name | |
| filesnd | external file with the original sound |
| int CRM32Pro_ISoundFX::SoundImport | ( | char * | fileDPF, | |
| char * | namesnd, | |||
| char * | filesnd | |||
| ) |
Save a WAV,VOC,AIFF and OGG sound to DPF(using a filename) file from external file.
| fileDPF | DPF file to store the sound | |
| namesnd | sound name | |
| filesnd | external file with the original sound |
| unsigned char CRM32Pro_ISoundFX::SoundInfo | ( | int | idDPF, | |
| char * | namesnd, | |||
| sAudioType * | sndtype | |||
| ) |
Get information about given sound stored on DPF(an idDPF) or file. Only supports WAV,VOC,AIFF and OGG.
| idDPF | ID of the opened DPF | |
| namesnd | if idDPF is 0, this is the name of an external file. Otherwise, this is sound name | |
| sndtype | pointer to sAudioType |
| unsigned char CRM32Pro_ISoundFX::SoundInfo | ( | char * | fileDPF, | |
| char * | namesnd, | |||
| sAudioType * | sndtype | |||
| ) |
Get information about given sound stored on DPF or file. Only supports WAV,VOC,AIFF and OGG.
| fileDPF | DPF file to look for the sound | |
| namesnd | if "fileDPF" is NULL, this is the name of external file. Otherwise, this is sound name | |
| sndtype | pointer to sAudioType |
| int CRM32Pro_ISoundFX::SoundLoad | ( | int | idDPF, | |
| char * | namesnd | |||
| ) |
Load WAV,VOC,AIFF and OGG sound from DPF(using an idDPF) file.
| idDPF | ID of the opened DPF | |
| namesnd | sound name |
| int CRM32Pro_ISoundFX::SoundLoad | ( | char * | fileDPF, | |
| char * | namesnd | |||
| ) |
Load WAV,VOC,AIFF and OGG sound from DPF(using a filename) file.
| fileDPF | DPF file that contains the sound | |
| namesnd | sound name |
| int CRM32Pro_ISoundFX::SoundLoad | ( | const char * | f | ) |
Load WAV,VOC,AIFF and OGG sound from external file.
| f | file that contains the sound |
| void CRM32Pro_ISoundFX::SoundPlay | ( | int | ch, | |
| int | hndSound, | |||
| int | loops | |||
| ) |
Play a sound.
| ch | the channel to use to play the sound | |
| hndSound | sound handle with the sound | |
| loops | number of loops, -1 is infinite loops. Passing one here plays the sample twice (1 loop). |
| void CRM32Pro_ISoundFX::SoundVolume | ( | int | hndSound, | |
| int | vol | |||
| ) |
Sound volume control.
| hndSound | sound handle to adjust the volume | |
| vol | volume from 0 to 255 |
1.6.1