Next question about binary files/combining them, etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Depending on what you're building, it could be very easy or extremely
difficult. When posting on mailing lists, you need to give other developers
more information about your application so we can give you useful
information.

Also, for general web-dev questions, sites like stackoverflow.com can
usually provide better answers, and if you're unfamiliar with google's
site: and inurl:
operators<http://support.google.com/websearch/bin/answer.py?hl=en&p=adv_operators&answer=136861>,
learning how to use them will make your life immensely easier.

First off, are you doing this in the client (web browser) or the server?
For mixing audio files on the server side, you'd want to use ffMPEG +
whatever PHP interface library you prefer to control it. You would use
either uncompressed WAV files or a compressed format like MP3 depending on
how disk-bound the server is.

For the client side, you would never send the data as a WAV file because it
would use 10 times as much bandwidth as a MP3. Most developers would use
Adobe Flash to load the files and mix them. You could also experiment with
HTML5, but the majority of browsers *currently in use* don't have enough
HTML5 audio support to get the job done. See the Wikipedia article on
HTML5.

Another consideration is the number and size of audio files. If you're
using simple HTML GET requests to fetch your files, you can't use a file
until the *entire* file has been transferred. If you have big files or lots
of files, this could be a problem. The usual solution is to use a streaming
server like RED5 or LightHTTPD's progressive download. Look it up on
Wikipedia.

Saving the output to disk is another consideration. If you have to do this,
the only practical option would be to do it on the server side. Writing
code to decompress an audio file, mix it, and re-compress it in Adobe Flash
or JavaScript would be a massive project.

So, in terms of "simple/doable" ...depending on whether you're trying to
mix sound-effects for a hack-a-thon web game, or whether you're trying to
build an online DJ mixing system ...you're looking at anything from a full
day's work to a 5-year project.

^C^


===========================================================


How simple/doable would it be to do something like sort of dynamically
combine multiple .wav files into a single file/output track?

Know that should be doable, but firstly wonder if something like .wav files
could be combined into one sort of output file, or if it might be better to
rather trigger their playback using something like JQuery, or something so
they then seemed to be combined, but while still separate..?

Stay well

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux