Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Changing the speed of a sound

Author
Message
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd May 2003 20:20 Edited at: 3rd May 2003 22:45
Is there any reason why I can't change the speed of a sound once it is playing?

I am trying to change the frequency of an engine noise to make it sound like it is accelerating. It plays fine, until I change the speed, then it stops.

I am printing the frequency to the screen to double check, and the frequency is also fine.

Any help appreciated!

Thanks in advance.
All the Best,
StevieVee
kevil
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 3rd May 2003 20:58
Well, it does work for me. I use it for doppler effects in Galactic Chaos. Don't know why it doesn't work for you :S

Kevil

BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd May 2003 22:50 Edited at: 3rd May 2003 23:15
I changed my 3d sounds to normal sounds, and it works. Trouble is, my sound needs to be attached to a vehicle, and the listener to the camera. So that doesn't solve my problem.

Did the same with volume, and this works fine. I can ramp the volume up and down as much as I like.

Thanks in advance.
All the Best,
StevieVee
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 5th May 2003 14:29
you need a sound card that supports the whole 3d sound thing, any card can change the frequency, but not all can handle 3d sounds... Like on my old computer it would cracle and hiss like crazy, but sounds beautiful on my new comp.. This is something you will probably want to make an option to users with older sound cards like you and me^_~

The 3D Modeler's Group : http://groups.yahoo.com/group/3dModeler/
The Unofficial DB Newsgroup : http://groups.yahoo.com/group/DBMag/
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th May 2003 23:24
I finally worked it out, prompted by a request from Rich to send him the code...

I issued a SET SOUND SPEED command to a 3D sound that wasn't yet playing. This stopped it from working, but doesn't generate a runtime error. Interestingly, you can get away with this with a normal sound, and you can also send a SET SOUND VOLUME to a 3D sound without it hitting the "feature".

I don't know if this is an issue with my hardware (onboard Creative Labs 128) or a more general one.

Thanks for the suggestions.

Thanks in advance.
All the Best,
StevieVee

Login to post a reply

Server time is: 2025-05-18 02:01:51
Your offset time is: 2025-05-18 02:01:51