VOGONS


First post, by jennifer3

User metadata
Rank Newbie
Rank
Newbie

A program I wrote and am running under DOSBox cointains the following line of code:

printf("\a");

I would expect to hear a beep, but there's nothing.

Absent making the above line of code work, is there some sort of workaround for this? Like some sort of function call to a sound package that would do this?

I would prefer something simple, not something with a lot of features I would never use. My code and data segments are getting rather full and I don't want to go over 64K on either. Please don't suggest a different memory model.

I'm running DOSBox 0.74 under Debian Linux 6 (Wheezy) with the MATE desktop. My program is compiled under Turbo C.

Jennifer

Last edited by jennifer3 on 2015-02-17, 10:45. Edited 1 time in total.

Reply 1 of 3, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

PC speaker sound is emulated in DOSBox, but the "bell" character's beep when printed out is not implemented because games generally don't need it. However, in Turbo C you can produce the beep at the classic frequency with:

#include <dos.h>

void beep (void) {
sound(900);
delay(333);
nosound();
}

Reply 3 of 3, by kolano

User metadata
Rank Oldbie
Rank
Oldbie
jennifer3 wrote:

Now if someone could tell me how to mark this thread solved ...

It's a bit atypical to do here, but you should be able to rename the title of threads you've posted. Use the "edit" button on the first post.

Eyecandy: Turn your computer into an expensive lava lamp.