Page 1 of 1

PB 6.10 - quiet sound

Posted: Fri Sep 12, 2025 10:30 am
by User_Russian
Code (tested in Windows x64).

Code: Select all

If InitSound() = 0
  MessageRequester("Error", "Sound system is not available",  0)
  End
EndIf

SoundFileName$ = OpenFileRequester("Choose a .wav file", "", "Wave files|*.wav",0)
If SoundFileName$
  If LoadSound(0, SoundFileName$)
    PlaySound(0, #PB_Sound_Loop)
    MessageRequester("Sound", "Playing the sound (loop)..."+#LF$+"Click to quit..", 0)
  Else
    MessageRequester("Error", "Can't load the sound.", 0)
  EndIf
EndIf
End
In PB 6.10 and next versions the sound is very quiet and hard to hear and it is necessary to increase the system volume in Windows.
It's probably because miniaudio, but how to fix this and make the sound louder?

I tested low level APIs from miniaudio (functions ma_device_config_init(), ma_device_init() etc.) and the sound is just as quiet. How to make it louder like versions before PB 6.10?

Re: PB 6.10 - quiet sound

Posted: Fri Sep 12, 2025 1:11 pm
by BarryG
Can't help you, but I do want to remind that you can't rely on InitSound() to test for a valid sound device -> viewtopic.php?p=640641

Even Fred confirms that in the topic I linked to -> viewtopic.php?p=640582#p640582

Re: PB 6.10 - quiet sound

Posted: Fri Sep 12, 2025 2:49 pm
by User_Russian
I don't rely on InitSound().
The problem is low volume level, in PB 6.10 and later versions, when using the miniaudio library.
In version 6.04 and previous, the volume is at a normal level.
In PB 6.10 volume is 3 times less than in PB 6.04.
My question is how to increase the volume level in miniaudio library?

Re: PB 6.10 - quiet sound

Posted: Mon Sep 15, 2025 3:14 am
by firace
According to ChatGPT, this is due to some volume normalisation applied by miniaudio.
As a quick fix, it suggests to try this:

SoundVolume(#PB_All, 2.0)

Re: PB 6.10 - quiet sound

Posted: Mon Sep 15, 2025 11:07 am
by User_Russian
firace wrote: Mon Sep 15, 2025 3:14 amSoundVolume(#PB_All, 2.0)
Then the sound is not heard at all.
Volume.f - The new volume for the sound. Valid values are from 0 (no volume) to 100 (full volume).
The value 200 is invalid and the debugger stops the application.

Re: PB 6.10 - quiet sound

Posted: Mon Sep 15, 2025 11:25 am
by RASHAD
Hi
If you didn't do the next tip then do it :)
1- Go to System -> Sound
2- More sound settings
3- The output device Properties
4- Enhancement
4- Select Equalizer and Loudness Equalization

Re: PB 6.10 - quiet sound

Posted: Mon Sep 15, 2025 3:46 pm
by User_Russian
firace wrote: Mon Sep 15, 2025 3:14 amAccording to ChatGPT, this is due to some volume normalisation applied by miniaudio.
Google wrote that miniaudio does not support normalisation.
Image
RASHAD wrote: Mon Sep 15, 2025 11:25 am4- Select Equalizer and Loudness Equalization
Maybe "Realtek Audio" does not support this feature because this tab is missing from the window.