File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,13 @@ public class AudioManager : AudioCollectionManager<AudioComponent>
7070 /// The names of all available audio devices.
7171 /// </summary>
7272 /// <remarks>
73+ /// <para>
7374 /// This property does not contain the names of disabled audio devices.
75+ /// </para>
76+ /// <para>
77+ /// This property may also not necessarily contain the name of the default audio device provided by the OS.
78+ /// Consumers should provide a "Default" audio device entry which sets <see cref="AudioDevice"/> to an empty string.
79+ /// </para>
7480 /// </remarks>
7581 public IEnumerable < string > AudioDeviceNames => audioDeviceNames ;
7682
@@ -334,7 +340,9 @@ private bool setAudioDevice(string deviceName = null)
334340 return true ;
335341
336342 // try using the system default if there is any device present.
337- if ( audioDeviceNames . Count > 0 && setAudioDevice ( bass_default_device ) )
343+ // mobiles are an exception as the built-in speakers may not be provided as an audio device name,
344+ // but they are still provided by BASS under the internal device name "Default".
345+ if ( ( audioDeviceNames . Count > 0 || RuntimeInfo . IsMobile ) && setAudioDevice ( bass_default_device ) )
338346 return true ;
339347
340348 // no audio devices can be used, so try using Bass-provided "No sound" device as last resort.
You can’t perform that action at this time.
0 commit comments