Android :: Using AudioTrack In Android To Play A WAV File

Oct 13, 2010

I'm working with Android, trying to make my AudioTrack application play a Windows .wav file (Tada.wav). Frankly, it shouldn't be this hard, but I'm hearing a lot of strange stuff. The file is saved on my phone's mini SD card and reading the contents doesn't seem to be a problem, but when I play the file (with parameters I'm only PRETTY SURE are right), I get a few seconds of white noise before the sound seems to resolve itself into something that just may be right. I have successfully recorded and played my own voice back on the phone I created a .pcm file according to the directions in this example:http://emeadev.blogspot.com/2009/09/ raw-audio-manipulation-in-android.html Anybody got some suggestions or awareness of an example on the web for playing a .wav file on an Android?

Android :: Using AudioTrack in Android to play a WAV file


Android :: How To Play Music From AudioTrack

Feb 15, 2010

I want to play music from online mp3 link.I am reading the music data into a stream and trying to play it using audio track. But itz giving only noise.No music i could listen.Same buffer I can play in Media Player,But i could not play in audio track.

View 16 Replies View Related

Android :: AudioTrack Stop/release - AudioTrack Plays In The STREAM Mode

Dec 25, 2009

I need to stop the AudioTrack, regardless what's in the buffer, immediately when executing the stop/release. The AudioTrack plays in the STREAM mode. It appears that the AudioTrack finishes playing what's in the buffer and than stops. It seems that it's such a fundamental flaw since there are so many audio applications out there.

View 4 Replies View Related

Android :: Unable To Play File When Set Data Source To Sd Card File

Apr 13, 2009

I am trying to play file which is stored in SDCARD in emulator. I have Linux O/S. So i need to provide command in run configuration. I am providing following parameter.

-sdcard /usr/android/sdcard/mysdcard.iso -audio oss [i]

The following is my code to play file.

try { mMediaPlayer.setDataSource("/sdcard/test_cbr.mp3"); mMediaPlayer.prepare(); // Giving error. mMediaPlayer.start(); }

View 4 Replies View Related

Play Video File On Android Device But Getting Error - Cannot Play Video

Aug 7, 2011

Im using Eclipse created new android project.First thing i added to the menifest xml file two lines:

Code:
uses-permissionandroid:name="android.permission.INTERNET"></uses-permission>
<uses-permissionandroid:name="android.permission.STORAGE"></uses-permission>

And this is the complete menifest file code:

Code:
xmlversion="1.0"encoding="utf-8"?>
manifestxmlns:android="http://schemas.android.com/apk/res/android"
package="com.AllFormatsVideoPlay"
android:versionCode="1"
android:versionName="1.0">
[code]....

Now i tried to play a video file .3gp from the internet youtube link via my android device ! not emulator. And it worked! But when i tried to play a video file .3gp or .mp4( i converted the mp4 from 3gp ) its not working. Im getting error "Cannot play video Sorry, this video cannot be played"

Tried to play with the link to my device wich is: I:DCIM100MEDIAVIDEO0030.3gp or .mp4 or tried this: I:/DCIM/100MEDIA/VIDEO0030.3gp with "" like: "I:/DCIM/100MEDIA/VIDEO0030.3gp ";

I tried to remove the I: but it didn't change anything.This is the main code im using to play the video files on my device. And there some lines i marked with // wich i used to play from the internet and im not using now.

Code:
com.AllFormatsVideoPlay;
import
android.app.Activity;
import
android.graphics.PixelFormat;
import
[code]....

View 7 Replies View Related

Android :: How Do You Play .wav File Attachments?

Nov 14, 2009

The messaging system at the company I work for generates .wav files for voicemails and sends them as attachments. When I try to open one of these attachments, it brings up the music player, and then the music player gives an error message along the lines of "sorry, player does not support this type of audio file".Is the only way to fix this to download some other music player? And if so, how would I set that as the default?

View 6 Replies View Related

Android :: Can Play More Than One File As Ringtone In App

Apr 5, 2010

I want to play couple of files as one ringtone in android app, How can I do it?

View 1 Replies View Related

Android :: Way To Play MID File In Droid?

Nov 12, 2010

I am writing a small piece of code ...

View 1 Replies View Related

Android : Play A Video File

Jan 20, 2010

I have a URL for a video file which I need to play using the native Video-player of the handset. I figured using Intent.ACTION_VIEW and setting the URI as Intent data, I am able to achieve the aforementioned on G1 except HTC hero. In case of Hero, I have to explicitly set the class Name in the Intent to start the default Video Player: intent.setClassName("com.htc.album","com.htc.album.ViewVideo")

However, I am not comfortable with this approach as it might break on other Android devices.

1. What would be the best way to play this video url via Intent, irrespective of the handset?

2. How to conditionally setClassName in Intent, specific to a Handset?

Writing a standalone Video Player for our app is NOT an option we can afford at the moment.

View 1 Replies View Related

Android : Can't Play Wma File On A Server / How To Fix?

Apr 25, 2009

The code...

View 2 Replies View Related

Android : Way To Play Sound File?

Jul 22, 2010

Can we play sound file in phone line (in background)?

View 4 Replies View Related

Android :: 1.5 How Can I Play HE AAC File Type With MediaPlayer?

Apr 28, 2009

Could I somehow trick the player on playing something of this format? I know that there is support for AAC encoded files but just how?

View 2 Replies View Related

Android :: Play Video File In Emulator

Apr 11, 2009

I push the one video file... and tried to play that video file in emulator.. But i got error...how can i check weather video file insert or not...

View 15 Replies View Related

Android :: Play A Flash File In WebView?

Dec 11, 2009

Does Android support flash? If yes then i need an example code to play a flash file. Wonder if we can play a flash file in WebView?

View 4 Replies View Related

Android :: Can I Use MediaPlayer API To Play Flv Media File

Jul 3, 2009

Recent news say that flash porting is finished for android and HTC Hero has support for flash. Can I use MediaPlayer API to play flv media file? Is there such documents?

View 3 Replies View Related

Android : Does M4V Format File Play In Droid?

Mar 31, 2010

i have a url for the video file.the format of that file is itunes M4V. i want to play it in android mobile. is it possible? if not so let me know?

View 2 Replies View Related

Android : Play Video From Ftp Streaming File

Oct 3, 2010

If found many tips about how to stream from classic url link, but nothing about ftp. Is it the same way to proced ?

View 1 Replies View Related

Android : Play A Video File From A Resource

Nov 24, 2010

I am trying to get a video to pop up and play. I can get it to work when I use the first uri (that is commented out in the below code), but when I try to use the second uri (from the resource), I get the following error:

CODE:..........

From researching the error, it looks like I might have to declare an activity in the manifest but I'm not sure if that applies here?? Can someone point me in the right direction?

CODE:............

View 1 Replies View Related

Android : How To Play A Media File On Emulator?

Feb 4, 2010

I have a code to run a start a media player a play an audio file saved in my local disk.But the code is not running and it is showing an exception...

View 6 Replies View Related

Android : How To Play An Encrypted File In Droid?

Apr 14, 2010

I need to be able to play an encrypted file in Android. The file is AAC. The only way I can see to do this is either: decrypt the file to internal private storage and point the player at that file to play, or decrypt & decode the file to pcm and feed it to an AudioTrack. 1 isn't great because it takes a long time to do that. 2 isn't great either because I don't know how I can take advantage of the HW decoder to do this.

View 1 Replies View Related

Android :: How To Use AudioRecord And AudioTrack?

Apr 30, 2009

I want to use AudioRecord and AudioTrack classes(in SDK 1.5) in my program. Where can I find how to use it. Is there any API demo program for this?. If not it is greatly appreciated if someone can post a sample code in this forum.

View 7 Replies View Related

Android :: How Do We Use AudioTrack Class?

Apr 23, 2009

I'm currently initiating the AudioTrack() for MODE_STREAM. I load some bytes using the write() and I see that it is working but once hit the play() call nothing happens. what is the matter? should I do something else that is not obvious? Any tips Google friends? My settings: streamType - STREAM_MUSIC sampleRateInHz - 44100 channel Config - CHANNEL _CONFIGURATION_STEREO audioFormat - ENCODING_PCM_16BIT bufferSizeInBytes - 256K the total size (in bytes) of the buffer where audio data is read from for playback. mode - MODE_STREAM.

View 21 Replies View Related

Android :: How To Play An Mp3 File Using Default Phone Player?

Nov 12, 2010

I want to play an mp3 file using the default android player. I managed to get the file playing but it plays in the background. I want to have all the nice controls for pausing, playing, etc. I do not know how I could do this! My code...

View 1 Replies View Related

Android :: Play Audio File From Assets Directory

Jul 20, 2010

when I run this code, it starts playing all the audio files in the assets directory, in alphabetical order instead of just playing the audio file I requested. What am I doing wrong? Is there a better way to play audio files from the assets directory?Is there a difference between keeping audio files in the assets directory and keeping them in the res/raw directory? Besides the fact that they don't get ids if they are in the assets directory. If I move the audio files to the res/raw folder then I have a problem with reusing MediaPlayers because there is no id parameter for setDataSource(). I can't find a good guideline for handling this kind of problem.

View 1 Replies View Related

Android :: Media Player To Play AVI And Other File Formats?

Feb 12, 2009

Is there any support for avi and other media formats except mp4 and 3gpp? If there is no support may I develop a support through correct the program? Will that be too difficult ?I don't know where to put my hands into first, should I correct programs in opencore first or should I just correct programs in directory frameworks/base/include/ media . I want to have a clear mind how I can achieve my goal, I need a roadmap to guide me how to do it.

I am trying to get familiar with the SDK 1.0 now. another question, my chip is from freescale and it supports hardware codecs of mpeg4, h.263 and h.264, I don't know whether I can change the program or the architecture of mediaplayer to utilize my hardware codecs instead of software codecs provided by android opencore. I once implement an mplayer to my platform, there is problems about sync of audio and video due to the quality of my chips(CPU can support software codecs but is not fast enough to make sure sync of audio and video), So I am worried about when the android is implemented, there would also be the same problem, and for this reason, I am thinking whether I can utilize my hardware codecs for mediaplayer.

View 3 Replies View Related

Android : How Can I Receive Call / Play Media File?

Jun 15, 2009

I want to develop application in which i want to listen call and play medial file so caller can listen it. Can some one tell me how can i do it ? any code snippt or link of resource.

View 7 Replies View Related

Android : How To Play A Sound File Under Droid Browser?

May 18, 2010

Is there any way to play a sound file under Android browser?

View 1 Replies View Related

General :: Play Streaming Radio File On Android?

Apr 13, 2012

I've been working with Android relatively well for the last six or so months and have been utterly shocked by the complete lack of mediaplayer software that will play streaming radio. I have two .m3u files and one .pls that I've tried in the stock player, Meridian, Astro mp, WinAmp Mobile, StreamFurious pro, and RadioHeart, but none of them will play it. Any media player or even a standalone program for Android that will play streaming radio files?

View 9 Replies View Related

Android :: AudioTrack - Clicking Sound

Dec 15, 2009

I am getting this clicking sound when playing static pcm data. Anybody out there is having the same problem? This is not the data issue.

View 7 Replies View Related

Android :: Synchronizing AudioTrack And AudioRecord

Jan 21, 2010

My application uses AudioTrack in streaming mode and AudioRecord simultaneously.My problem is that I start them at the same time, but I have no guarantee that they will actually start playback ecording in the same timestamp. The reason I need this kind of accuracy is because I use echo cancellation (subtracting audio played to speaker from the recording).My echo canceller doesn't require an exact delay, but the delay introduced between AudioTrack and AudioRecord moves in the range of 250ms (between different runs), and that's too much - each run is different because they start themselves asynchronously. The API doesn't provide me a way to make sure they start in the same time, so I thought about measuring this starting delay somehow and then using it in my calculation.Does anyone have an idea how to do that, utilizing their API or in any other way?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved