diff options
| author | miguel <miguel@localhost> | 2017-09-23 11:51:15 +0200 |
|---|---|---|
| committer | miguel <miguel@localhost> | 2017-09-23 11:51:15 +0200 |
| commit | 369376b5412a24692d4de925d1ecaa1b5168c000 (patch) | |
| tree | c0915ddf609d709a21fd3628e3350588f9ee6d53 /main.cpp | |
| parent | 22c9d944917d23ef83cbf9d9d96978767a4df4ab (diff) | |
show wav and target SDL_AudioSpec
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -126,17 +126,13 @@ void sdl_play_sound() if (first) { - std::cout << "---desired load wav---" << std::endl; - show_AudioSpec(&wavSpec); SDL_LoadWAV("music.wav", &wavSpec, &wavBuffer2, &wavLength2); - std::cout << "---" << std::endl; + std::cout << "---music.wav---" << std::endl; show_AudioSpec(&wavSpec); - std::cout << "---" << std::endl; SDL_LoadWAV("coin.wav", &wavSpec, &wavBuffer, &wavLength); + std::cout << "---coin.wav---" << std::endl; show_AudioSpec(&wavSpec); - std::cout << "---" << std::endl; - sample=wavLength; //std::cout << "---desired load wav---" << std::endl; @@ -153,6 +149,8 @@ void sdl_play_sound() // open most reasonable default device for playback. wavSpec.callback = audiomixer; deviceId = SDL_OpenAudioDevice(NULL, 0, &wavSpec, NULL, 0); + std::cout << "--- target---" << std::endl; + show_AudioSpec(&wavSpec); SDL_PauseAudioDevice(deviceId, 0); first=false; |
