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 / Recording Sounds

Author
Message
Guffie
19
Years of Service
User Offline
Joined: 8th Nov 2005
Location: Australia
Posted: 21st Apr 2006 06:31
I keep getting and error when recording sounds it is that the sound does not exist here is my code;


I have also tried

but it didnt work either does anyone know what is going on

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Apr 2006 08:02
The Record Sound command has been goosed for as long as I can remember.

My guess is that you'll have to go back to V1.10 or thereabouts to find a version of DB in which it works.

If I remember correctly, any versions prior to that don't support the Select Case statement (which is used in the example sound recorder program from the help folder). So, assuming that it originally worked correctly, you have to assume that it died in a later update.

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 21st Apr 2006 11:36
Could be your microphone - headsets usually provide the best quality for recording. I always had a destop microphone on a stand and Dark Basic could neever record any sounds for me... also the Microsoft SAPI 5.1 recognizer rarely ever recognized my voice.

my brother had a headset microphone, and never had either of these problems.

Now working based on your code:
Your first example requires you to hold the upkey straight away, if on the first frame, it's not being pressed, a sound won't have been recorded yet, so it won't exist.
On your second example, I would assume you haven't tried to press down without first pressing up... Some people on windows XP (I'm going to take a wild guess that you are using windows XP) have restrictions preventing them saving to their C drives; either try a different drive, or if you have only 1 drive, a different folder.

My problems with Dak Basic recording was usually just that I never heard anything. but the sound did exist. I have always used Version 1.12
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Apr 2006 16:23 Edited at: 21st Apr 2006 16:27
SimSmall

I rewrote his code for him and it just doesn't work. And I'm using a headset which I use for skype and set it so I could hear my voice through the phones when I talk, so I know it's not down to a mic problem.

I'm using XP too. Are you saying that it has worked for you but you weren't using XP? If so, then that could be the answer maybe...



[Edit] The use of V1.12 might be the answer - if I get time I'll try and see if I can dig it out...

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 21st Apr 2006 16:54 Edited at: 21st Apr 2006 17:00
I've just tried a whole range of machines here. ironically, I noticed a trend... Now I don't believe the OS had anything to do with the results, but:

Using the example walkie-talkie program, Our 2 machines running windows 2000 sent the sound, but only once. second time the program would freeze whilst "sending comm message"

The three machines running windows XP (Home and Professional) had a similar outcome, only no sound could be heard.

In both instances, the program was modified. It is told to use checklist index 1 for the net connection, which was serial. I changed this to the number that matched IPX since I've not used a serial cable in a VERY long time.

None of the sound cards are particularly new either, that could have been another factor.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Apr 2006 17:23
I've not heard of this 'walkie-talkie' program. It's certainly not in my help\examples\sound folder.

For me, Record Sound simply does not create a sound file. Period.

If you use Load Sound 1, you can play it. If you then Record Sound 1, upon completion, sound 1 simply does not exist. Obviously, you are supposed to only use an unused sound number, but I was just confirming that the Record Sound was at least doing something (albeit incorrectly) rather than doing absolutely nothing.

It seems to initialise memory for the sound, but never completes the actual recording stage.

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 21st Apr 2006 17:32 Edited at: 21st Apr 2006 17:36
Quote: "I've not heard of this 'walkie-talkie' program. It's certainly not in my helpexamplessound folder"


exe: Dark Basic\extras\multiplayer\radio.exe
dba: Dark Basic\help\examples\multiplayer\exam06.dba

may just be a freebie that came with my version.

edit: thinking about it, I can see why you possible looked in the wrong folder - this is a sound problem, not a muliplayer problem...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Apr 2006 01:40
Solved the problem!

That's if Guffie is still interested as he's not been back since...

Is seems that you have to:

a) Make sure that you have to go to the Windows volume control and select Microphone as the current device.

b) Load the sound immediately after saving it.

The following code works fine now. The sound recording example in the help files does not.



TDK_Man

Guffie
19
Years of Service
User Offline
Joined: 8th Nov 2005
Location: Australia
Posted: 24th Apr 2006 03:11 Edited at: 24th Apr 2006 03:15
IT WORKS!!! Thanks TDK!!!

Login to post a reply

Server time is: 2025-05-23 16:52:30
Your offset time is: 2025-05-23 16:52:30