There are some limits with the new sound system?

Just starting out? Need help? Post your questions and find answers here.
Lebostein
Addict
Addict
Posts: 840
Joined: Fri Jun 11, 2004 7:07 am

There are some limits with the new sound system?

Post by Lebostein »

The new sound lib sounds great (on Mac)! No more scratching and stuttering! :D 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 :|
infratec
Always Here
Always Here
Posts: 7664
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: There are some limits with the new sound system?

Post 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.
Lebostein
Addict
Addict
Posts: 840
Joined: Fri Jun 11, 2004 7:07 am

Re: There are some limits with the new sound system?

Post 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... :wink:
Last edited by Lebostein on Sat Jan 13, 2024 8:07 pm, edited 3 times in total.
infratec
Always Here
Always Here
Posts: 7664
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: There are some limits with the new sound system?

Post by infratec »

Ah, ok. I don't have an apple to test.
infratec
Always Here
Always Here
Posts: 7664
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: There are some limits with the new sound system?

Post 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... :wink:
No, it was Infratec plus, then Infratec AG, but the company is closed.
Lebostein
Addict
Addict
Posts: 840
Joined: Fri Jun 11, 2004 7:07 am

Re: There are some limits with the new sound system?

Post 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...
User avatar
Piero
Addict
Addict
Posts: 1040
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: There are some limits with the new sound system?

Post 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!
infratec
Always Here
Always Here
Posts: 7664
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: There are some limits with the new sound system?

Post 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 :mrgreen:
User avatar
Piero
Addict
Addict
Posts: 1040
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: There are some limits with the new sound system?

Post by Piero »

infratec wrote: Sat Jan 13, 2024 11:21 pm access to some Apples
:mrgreen: :mrgreen: :mrgreen:
Post Reply