Fix audio engine initialization
This commit is contained in:
parent
31e1e84c69
commit
72bbdec7d9
1 changed files with 2 additions and 4 deletions
|
|
@ -47,13 +47,11 @@ namespace psemek::audio
|
|||
if (device = SDL_OpenAudioDevice(nullptr, 0, &desired, &obtained, 0); device == 0)
|
||||
sdl2::fail("SDL_OpenAudioDevice failed:");
|
||||
|
||||
buffer.resize(obtained.samples * obtained.channels);
|
||||
|
||||
SDL_PauseAudioDevice(device, 0);
|
||||
|
||||
log::info() << "Initialized audio: " << static_cast<int>(obtained.channels) << " channels, " << obtained.freq << " Hz, " << obtained.samples << " samples";
|
||||
|
||||
buffer.resize(obtained.samples * obtained.channels);
|
||||
output = std::make_shared<channel>();
|
||||
SDL_PauseAudioDevice(device, 0);
|
||||
}
|
||||
|
||||
engine::impl::~impl()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue