Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

memory allocate and waveplay in C++

Status
Not open for further replies.

r2d2droids

Member level 2
Member level 2
Joined
Jan 28, 2005
Messages
46
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
335
how can i allocate memory filled it 8 bytes datas form usb device and play this buffer in C++. any code? how can i do this. please help...
 

Is this what you're asking?
1. Allocate 8 bytes of memory
2. Get 8 bytes from the USB port/device
3. Load the 8 bytes into the allocated memory
4. Play the 8 bytes like a wave file
5. Do it all in C++

If so, what do the 8 bytes represent?
A wave file has a specific format and you will have to build the full wave file.
8 bytes is going to sound like a 'tic' if that.
Maybe some more info would help
 

thx for reply;

it must be like this;
1.allocate 1024 bytes of memory
2.read 128 times usb device and get 8 bytes from it every time
3.load datas into allocated memory
4.play the 1024 bytes recorded data like a wave file
5. and do it in C++ :D

i am trying to make usb audio streaming. i wrote alot of codes but nothing.

in my project. PIC uC gets the analog audio signals and turns it digital data. sends it FT232 usb-serial converter via USART. and then converter sends it to PC.
thus far its ok. but then i couldnt do this as the same success.

please help.
 

What do you mean "nothing" happens. Can you trace the program or use debugging to determine if the data that you're sending to the sound card is really changing?

Did you check the Audio Control Panel? If you don't have the output part of the mixer setup properly, you won't hear anything !!!!!!!!!
Double-Click the Speaker icon on your taskbar. Then Options:properties. Check the Playback button. Then OK. Now set the volume sliders for Master Volume and Wave to max and not muted.

Maybe this will help.
 

every thing is ok. but i couldnt write the program...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top