Pages: [1]   Go Down
Author Topic: audio streaming via serial  (Read 1275 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello im trying to get the sript running that i found on the old forum
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1282666614
but im new to all this stuff and i just cant transmit audio over serial can somebody help me with this?
Logged

Offline Offline
Edison Member
*
Karma: 34
Posts: 1319
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's just like any other data, except there are a couple of special considerations for "streaming"...

Are you transmitting, receiving, or both?    What are you communicating with, and does that other device use a particular serial protocol?  Do you need to store the audio?  What kind of "processing" is the Arduino doing?

The "special considerations" are that audio needs to be buffered because it needs to flow continuously and smoothy (or apparently smoothly-continuously ) when the processor is off doing other things (like proccessing the audio data, or switching between transmitting/receiving, etc.)  Also, audio takes-up quite a bit of memory, and needs high speed transmission (depending on how much audio you are storing and what quality you need).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i just want to stream some music via serial and i did think the project from the old forum was just what i want bu i cant get it working so i want to ask help on this forum.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In what way doesn't it work? What are you using to stream the audio feed? Post the sketch you have on your Arduino.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im also having issues using the 'streaming audio' sketch. no matter what data i send it, i just cannot get the arduino to play the data. :s

im using autoit3 to send the required 10 bytes for data length, then i send it random bytes for audio, and nothing works. i even
used the previous data used in speaker_pcm sketch and still got nothing.
Logged

Peace, Love, Light, Infinity

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i fixed it!

in the source:
Code:
   while (Serial.available() < 64)
    {
    //Blink the LED on pin 13.
    digitalWrite(ledPin,!digitalRead(ledPin));
    delay(100);
    }
for some odd reason completely blocks input data, so i removed it.

then used autoit to send 10 bytes to represent length, following that.. raw sound bytes, plays like a charm!
but, there is a lot of noise from the computer, such as HDD read/writes, using arrow keys on windows explorer folder windows, etc.

ima attach an archive with autoit3 sources, sample data, modified sketch, etc.
ill admit this code is a bit sloppy, but functional

* PCMAudio.7z (2062.9 KB - downloaded 8 times.)
Logged

Peace, Love, Light, Infinity

Pages: [1]   Go Up
Jump to: