Prepare the local audio device
| 163 | |
| 164 | // Prepare the local audio device |
| 165 | bool cSound_PC2::devicePrepare() { |
| 166 | |
| 167 | int audio_rate = 22050; |
| 168 | Uint16 audio_format = AUDIO_U8; |
| 169 | int audio_channels = 2; |
| 170 | int audio_buffers = 1024; |
| 171 | |
| 172 | if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) != 0) { |
| 173 | mSound = false; |
| 174 | } |
| 175 | else { |
| 176 | mSound = true; |
| 177 | Mix_ChannelFinished( Mixer_ChannelFinished2 ); |
| 178 | } |
| 179 | |
| 180 | return true; |
| 181 | } |
| 182 | |
| 183 | void cSound_PC2::MixerChannelFinished( int32 pChannel ) { |
| 184 |
nothing calls this directly
no outgoing calls
no test coverage detected