How to Play mp3 file from memory in delphi? - delphi

I am downloading a mp3 file from the internet to memory using InternetReadFile. This works great, I can dump the file on disk and then play it, but I want to play the file without dumping it on disk.
Is there a library i can use to achieve this functionality ? Some docs on how to use the library would be useful too.
Thanks in advance.

You can use the BASS Delphi audio library
On the other side, search for "MP3" on the 3D Buzz site. They have a very good series of video tutorials that walk you through the creation of your own MP3 player in Delphi using this library.

Related

How to convert convert .CAF file into .MP3 in iOS?

I am recording audio file. It is recorded with .caf extension.
How can I convert this format into .mp3 format?
There is a open source project lame . The challenge would be making it work for iphone. This would give a direction towards cross compiling for ios.
There is also an iOSMp3Recorder available on GIT and one another example
Record and audio conversion in internet.
I hope above examples may help you.
Using Lame, you can do this. Ther is no default function for this. It will also reduce the file size also. For 60 second audio file .caf will take approx 5mb - 10mb but after converting to .mp3 it will take 0.6mb to 0.7mb. Set 'Enable Bitcode' to 'NO' in build setting for new xocde, otherwise you will get error.
For sample code use this LINK.

How do I play a stream of an online M4A/AAC audio file in iOS?

Are there any libraries that exist that take in a URL as input, and starts playing the audio of the file?
I've tried AudioStreamer, but I run into ARC problems. I've also tried a couple of other libraries, but they don't seem to allow AAC files (only mp3).
<AVFoundation/AVAudioPlayer.h> and AVPlayer can help you.
AVPlayer the best solution for playing file in queue.

Is there a way to extract the file path of audio files in the Media Library?

I'm working on a music player for iOS, and I was wondering if there was a way to extract the file path of audio files inside the iPod/Media Library on iOS. I've read multiple articles, and it seems you can only extract an URL which can be only used with the AV framework player.
So can you extract the file name of audio files in the Media Library and play these files using an external audio library?
Thanks!

Why do I get this error "EMCIDeviceError" when opening some wav files in my program

Hey I have this program that has been working fine until I tried to open this one wav file? Not sure what the problem is or that I understand it? Do I need to find a new component to use for this file or what? I am using Delphi 4 Pro and the standard VCL component for Media Player. I am looking for a good new component that offers more help with wav and mp3 files too but not found what I am looking for yet?
Possible reasons for a EMCIDeviceError:
It's known that mediaplayer has problems with some MP3 files, depending from the version of the mediaplayer that is installed on the machine. Try updating mediaplayer on the problem-machine(s).
Maybe the sound drivers just need updating
You also get an EMCIDeviceError if there is no soundcard, or the drivers are corrupted, or there are no drivers at all. But then it would not play any other MP3 files, so I just mention this to help out other Forum readers.
This kind of EMCIDeviceError is raised when you provide a fully qualified filename to the TMediaPlayer.FileName property which exceeds certain no of characters. It has nothing to do with having spaces in the filepath. For example if you play sounds from the EXE directory and just provide the relative shortname, no error seems to happen. Also with absolute filename from elsewhere, if it is shorter than a certain limit, there is no error. I encountered it in XE5 and have resorted to sndPlaySound().

Ruby/Rails Audio Conversion Plugins?

I am looking for a good gem/plugin to convert user-uploaded audio files to different formats. One format in particular that I am interested in is converting to Apple .caf with ima4 compression for inclusion in an iPhone app.
I have been using afconvert on my mac for this so far, but I need to do it on my linux box, server-side. Ideally, I would be able to work into paperclip.
As an additional solution, ffmpeg could work, but I have not seen any .caf options for it. Anybody know of one?
The Sound eXchange project supports lots of audio file conversions. I've used this in the past to convert aiff files output by the OS X "say" program to ulaw files for Asterisk. This yields rather nice text-to-speech. For my purposes, I also found a Ruby extension on github called sox-ruby that wraps the libsox functions directly.

Resources