Fixed a bug where there would be no sound on Windows during the first start.
This commit is contained in:
		
							parent
							
								
									171196885d
								
							
						
					
					
						commit
						1c6afdce99
					
				@ -29,7 +29,7 @@ void AOBlipPlayer::blip_tick()
 | 
			
		||||
 | 
			
		||||
  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_ChannelPlay(f_stream, false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,7 @@ void AOMusicPlayer::play(QString p_song)
 | 
			
		||||
 | 
			
		||||
  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_ChannelPlay(m_stream, false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -224,7 +224,7 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) : QDi
 | 
			
		||||
 | 
			
		||||
    if (needs_default_audiodev())
 | 
			
		||||
    {
 | 
			
		||||
        ui_audio_device_combobox->addItem("Default");
 | 
			
		||||
        ui_audio_device_combobox->addItem("default");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (a = 0; BASS_GetDeviceInfo(a, &info); a++)
 | 
			
		||||
 | 
			
		||||
@ -31,7 +31,7 @@ void AOSfxPlayer::play(QString p_sfx, QString p_char, QString shout)
 | 
			
		||||
 | 
			
		||||
  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_ChannelPlay(m_stream, false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
 | 
			
		||||
  int a = 0;
 | 
			
		||||
  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);
 | 
			
		||||
      load_bass_opus_plugin();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user