Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Alexander Scott Hinds
Thu, 20 Aug 1992 07:22
Simultaneous Sound Recording & Playback via builtin mic
Author: Alexander Scott Hinds
Date: Thu, 20 Aug 1992 07:22
Date: Thu, 20 Aug 1992 07:22
9 lines
780 bytes
780 bytes
Hi- I'd like to write a program that would play back the sound being digitized by the builtin mic at the same time as the digitization (a slight delay would be acceptable). Is this possible? If so, how?? Note, I'm no DSP whiz (and don't really want to be, either), so any sample code would be QUITE appreciated. Thanks in advance! --X
Re: Simultaneous Sound Recording & Playback via builtin mic
Author: jolly
Date: Sat, 29 Aug 1992 17:20
Date: Sat, 29 Aug 1992 17:20
64 lines
2515 bytes
2515 bytes
In article <1992Aug20.072214.22387@morrow.stanford.edu> hinds@cmgm.Stanford
(Alexander Scott Hinds) writes:
> Hi-
>
> I'd like to write a program that would play back the sound being
> digitized by the builtin mic at the same time as the digitization (a
> slight delay would be acceptable). Is this possible? If so, how?? Note,
> I'm no DSP whiz (and don't really want to be, either), so any sample code
> would be QUITE appreciated. Thanks in advance!
>
> --X
Hiho and a bottle rum B)
I can t mail to Scott B( So i have to use this device for replying.
There is the possibility to record and playback sound at the same time.
How to build an example :
Take the NeXTDeveloper/Examples/Sound/recordchaintest.c and paste
the following
*********************************************---- ( copied from playtest.c)
play(int none)
{
int size, err, i=1000;
SNDSoundStruct *s;
//
// read each soundfile and queue it up for playing. The termination
// function will free the sound
//
{
err = SNDReadSoundfile(SNDFILE,&s);
if (err)
fprintf(stderr,"playtest : Cannot read soundfile\n");
else {
err = SNDStartPlaying(s,i,0,0,0,(SNDNotificationFun)SNDFree);
if (err)
fprintf(stderr,"playtest : Cannot play soundfile \n");
}
}
//
// wait for the sounds to finish
// Note that a tag of 0 means 'wait for all'
//
SNDWait(i);
cthread_exit(0);
}
***********************************************
define the following:
#define SECONDS 20.0 // more time to see that it works B)
#define SNDFILE "your soundfile.snd"
and insert the following line in the main()
cthread_detach(cthread_fork((cthread_fn_t)play,(any_t)0));
But I have problems in recoding and playing sounds under the NeXTStep
Environment.It works a while ( btw. 0- 60 Seconds ), but then I get a " Can t
require hardware resources ".
Jolly B)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads