Merge pull request #39 from Cerapter/mega-merge-audio-fix

Fix the no sound on Windows at start bug.
This commit is contained in:
oldmud0 2018-12-13 17:26:06 -06:00 committed by GitHub
commit a852ab504b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ void AOBlipPlayer::blip_tick()
HSTREAM f_stream = m_stream_list[f_cycle]; HSTREAM f_stream = m_stream_list[f_cycle];
if (ao_app->get_audio_output_device() != "Default") if (ao_app->get_audio_output_device() != "default")
BASS_ChannelSetDevice(f_stream, BASS_GetDevice()); BASS_ChannelSetDevice(f_stream, BASS_GetDevice());
BASS_ChannelPlay(f_stream, false); BASS_ChannelPlay(f_stream, false);
} }

View File

@ -21,7 +21,7 @@ void AOMusicPlayer::play(QString p_song)
this->set_volume(m_volume); this->set_volume(m_volume);
if (ao_app->get_audio_output_device() != "Default") if (ao_app->get_audio_output_device() != "default")
BASS_ChannelSetDevice(m_stream, BASS_GetDevice()); BASS_ChannelSetDevice(m_stream, BASS_GetDevice());
BASS_ChannelPlay(m_stream, false); BASS_ChannelPlay(m_stream, false);
} }

View File

@ -224,7 +224,7 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) : QDi
if (needs_default_audiodev()) if (needs_default_audiodev())
{ {
ui_audio_device_combobox->addItem("Default"); ui_audio_device_combobox->addItem("default");
} }
for (a = 0; BASS_GetDeviceInfo(a, &info); a++) for (a = 0; BASS_GetDeviceInfo(a, &info); a++)

View File

@ -31,7 +31,7 @@ void AOSfxPlayer::play(QString p_sfx, QString p_char, QString shout)
set_volume(m_volume); set_volume(m_volume);
if (ao_app->get_audio_output_device() != "Default") if (ao_app->get_audio_output_device() != "default")
BASS_ChannelSetDevice(m_stream, BASS_GetDevice()); BASS_ChannelSetDevice(m_stream, BASS_GetDevice());
BASS_ChannelPlay(m_stream, false); BASS_ChannelPlay(m_stream, false);
} }

View File

@ -9,7 +9,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
int a = 0; int a = 0;
BASS_DEVICEINFO info; BASS_DEVICEINFO info;
if (ao_app->get_audio_output_device() == "Default") if (ao_app->get_audio_output_device() == "default")
{ {
BASS_Init(-1, 48000, BASS_DEVICE_LATENCY, nullptr, nullptr); BASS_Init(-1, 48000, BASS_DEVICE_LATENCY, nullptr, nullptr);
load_bass_opus_plugin(); load_bass_opus_plugin();