Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 93
61  Using Arduino / Audio / Re: How to play Raw audio? on: November 13, 2013, 01:42:28 pm
I'm doing it like in the example I linked above.  So I need them.  What does need them mean?  Just specify them in the HTML5 code like above?  What if the wav file is coming from another host?  How does it send the  Content-type headers?
62  Using Arduino / Audio / Re: How to play Raw audio? on: November 13, 2013, 12:45:10 pm
I plan on doing it like this:
http://www.w3schools.com/html/html5_audio.asp
Content-type headers are not needed?

I know I don't have to use the Electric Imp.
I want to use the Imp, for another related project.
Can I serve the audio file from the Agent to my HTML5 webpage above?
63  Using Arduino / Audio / Re: How to play Raw audio? on: November 13, 2013, 09:55:26 am
@Chris- These are great projects!  But I want to record from Uno, and play on iPhone.
64  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 09:22:16 pm
Great advice.  You're the most knowledgeable on this topic so far.  How about Content-type headers?  Are they determined by the file extension automatically?  Are they only needed in the HTML5 code?  Are they an issue anywhere in this project using HTML5 (not Flash player)?

The most difficult question of all:
Can I use an Electric Imp Agent to directly serve the file to the HTML5 page?  I have sent the contents of a file this way before including the WAV headers.  The path is binary clean so I don't have to BASE64 encode it.
65  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 06:47:44 pm
I believe I only need one line of PHP:
file_put_contents('test.WAV', file_get_contents('php://input'));
66  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 05:24:33 pm
Read it again SirNick.  Fixed length files!  That's a grand idea!  Then I can start streaming with the constant WAV header.  Since I already know the length I don't have to go back to fix it.  No random access or CGI needed.  All the processing is done on the microcontroller.  I like Simple.  Much less RAM needed.
67  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 05:17:13 pm
According to your link PCM in WAV is the only format that works on 3 of the 5 browsers completely including iPhone Safari.  Those are my requirements.  If I want to include all browsers I have to use a Flash Player in addition, since iPhones don't do Flash.  This will be easy since I already have the AU/uLaw file data.  The header is only a few constant bytes which do not depend on length.  I will process the whole file at once.  uLaw does not work together with HTML5 audio in WAV.  PCM is required for 3 out of 5 browser compatibility.  So I will create 2 files.  PCM and AU.  Perhaps I will truncate the WAV data to 8 bits while the uLaw stays at 10 for better quality.  The file sizes will then be the same.  If I choose I can archive the uLaw data only.  So much work to do...
68  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 03:10:23 pm
Can the HTML5 Audio object play a uLaw encoded WAV file?  On iPhone? 
Then I'd only need 1 file format...
69  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 02:54:33 pm
I should say near real time.  It will take a few seconds after the recording is complete before it can finish sending it to the server, then to the browser.  I don't see the need for MP3 conversion, since I plan to use uLaw in addition to PCM.  Unless it's simple.  Would you be able to help me when I get to that point?  CGI or Javascript?
70  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 11:21:26 am
Like a Webcam without Video!  Except only when triggered by an event.
71  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 11:20:17 am
It seems many browsers support HTML5 Audio?  But not IE9
http://blog.deepbluesky.com/blog/-/browser-support-for-css3-and-html5_72/

Here's how to test yours:
http://fmbip.com/
72  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 10:54:45 am
I should explain to prevent confusion.  The audio files are generated in real time.  I cannot convert them to MP3 or any arbitrary format in advance thru a manual process because the data is constantly changing.
73  Using Arduino / Audio / Re: How to play Raw audio? on: November 12, 2013, 10:48:40 am
Thanks for all of your timely advice!  If I make the WAV header on the Uno, I can use HTML5 which works with an Iphone Browser like this:
http://www.w3schools.com/html/html5_audio.asp

Since I already have uLaw data, I can add a much simpler header, only a few bytes.  Then play with this Flash Player on most browsers, but not iPhone.  The advantage is half the data size and more customization.
http://allmybrain.com/2012/03/16/quick-convert-raw-g711-ulaw-audio-to-a-au-file/
https://github.com/francois2metz/WavPlayer/blob/master/tinyembed.html

I wish I could have the best of both worlds in one file, but instead I will have to implement both?
So it will run on all platforms.
74  Using Arduino / Project Guidance / Re: 8MHz REAL disadvantages discussed on: November 12, 2013, 08:41:42 am
Ditto.   There are many advantages to running at 8Mhz.  But the cost of the external oscillator in bulk is not one of them.  They are not much more than 2c.
75  Using Arduino / Audio / Re: How to play Raw audio? on: November 11, 2013, 06:21:39 pm
Is there a Flash or Java player I can embed on my web site? 
One that plays uncompressed PCM?  uLaw?
Pages: 1 ... 3 4 [5] 6 7 ... 93