Page 1 of 1
There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 7:44 pm
by Lebostein
The new sound lib sounds great (on Mac)! No more scratching and stuttering!

I have removed the BASS library from my projects with sound and I use the PB internal sound lib now. But some sounds are played incorrectly, example a beep sound with 11.025 Hz:
https://www.lebostein.de/temp/beep.wav
Code: Select all
InitSound()
LoadSound(0, "beep.wav")
PlaySound(0, 0, 100)
Delay(2000)
All you hear is screeching gibberish from the loudspeaker

Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 7:52 pm
by infratec
You know that your beeb.wav is a square wave
Square waves sounds always 'distorted'.
Try a beep.wav with a sine wave instead.
Btw. I used Audacity to inspect the file. You can also create a sine wave file with it.
Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 7:54 pm
by Lebostein
infratec wrote: Sat Jan 13, 2024 7:52 pm
You know that your beeb.wav is a square wave
Square waves sounds always 'distorted'.
Try a beep.wav with a sine wave instead.
Btw. I used Audacity to inspect the file. You can also create a sine wave file with it.
It must be a square wav (to "emulate" old computer music, I play it with different frequencies in a sequencer like program, build with PB). If I play the file with VLC or Audacity or with the BASS library I can hear a clean and smoth "beep" sound, but with PB I hear a screeching noise...
PS: Is it the Infratec on Gostritzer Str.? I worked in the same building...

Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 8:04 pm
by infratec
Ah, ok. I don't have an apple to test.
Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 9:03 pm
by infratec
Lebostein wrote: Sat Jan 13, 2024 7:54 pm
PS: Is it the Infratec on Gostritzer Str.? I worked in the same building...
No, it was Infratec plus, then Infratec AG, but the company is closed.
Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 10:28 pm
by Lebostein
The sound file may have been in an invalid format that not all players tolerate. After loading and saving the sound with Audacity in the same format, the problem with PB no longer occurs...
Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 11:15 pm
by Piero
infratec wrote: Sat Jan 13, 2024 8:04 pm
Ah, ok. I don't have an apple to test.
Am I dreaming? A PB programmer wishing he had a Mac? NO WAY!
Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 11:21 pm
by infratec
Piero wrote: Sat Jan 13, 2024 11:15 pm
Am I dreaming? A PB programmer wishing he had a Mac? NO WAY!
I need to write programs cross platform for all 3 OSs.
So at work I have also access to some Apples.
But I prefer my daily Granny Smith at the first break

Re: There are some limits with the new sound system?
Posted: Sat Jan 13, 2024 11:41 pm
by Piero