Prepare the local audio device
| 90 | |
| 91 | // Prepare the local audio device |
| 92 | bool cSound_PC::devicePrepare() { |
| 93 | |
| 94 | int audio_rate = 22050; |
| 95 | Uint16 audio_format = AUDIO_U8; |
| 96 | int audio_channels = 2; |
| 97 | int audio_buffers = 1024; |
| 98 | |
| 99 | if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) != 0) { |
| 100 | mSound = false; |
| 101 | } |
| 102 | else { |
| 103 | mSound = true; |
| 104 | Mix_ChannelFinished( Mixer_ChannelFinished ); |
| 105 | } |
| 106 | |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | void cSound_PC::MixerChannelFinished( int32 pChannel ) { |
| 111 |
nothing calls this directly
no outgoing calls
no test coverage detected