How to record voice dynamic?

Status
Not open for further replies.

ezyneab

Newbie level 4
Joined
Jun 23, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
thailand
Activity points
1,389
dsk6713_aic23

original
I can talk is 24000/8000 = 3sec original i don't need

original
//------------------------------------
//Record.c Illustrates use of external memory with voice as input
#include "dsk6713_aic23.h" //codec-DSK support file
Uint32 fs=DSK6713_AIC23_FREQ_8KHZ; //set sampling rate
#define N 24000 //large buffer size
long i; short var; //flag when recording/playing
int buffer[N];

#pragma DATA_SECTION(buffer,".EXTRAM") //buffer->external memory
void main()
{
comm_poll(); //init DSK, codec, McBSP
DSK6713_DIP_init();
DSK6713_LED_init();
while(1) //infinite loop
{
if(DSK6713_DIP_get(3) == 0) //if SW#3 is pressed
{
DSK6713_LED_on(3); //turn on LED#3
for (i = 0; i<N; i++)

buffer = input_sample(); //input data
DSK6713_LED_off(3); //LED#3 off when buffer full
break;
}
};
var = 0;
while(1)
{
if((DSK6713_DIP_get(0)==0)&&(var==0)) //if SW#0 pressed/var=0
{
DSK6713_LED_on(0); //turn on LED#0
for (i = 0; i<N; i++)
output_sample(buffer*10); //play back
var=1;
DSK6713_LED_off(0); //LED#0 off when finished


}
if(DSK6713_DIP_get(0)==1) var=0; //toggle flag
};
}
//-------------------------------------------

I want to record voice dynamic mem by mean don't define time for record
but time for record be under the control of dip switch when on and off mean
start record when on switch and stop record when i release switch

I use dsk c6713.

thank you
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…