Android :: Raw Data From Sound File
Mar 19, 2009Does someone could tell me if it is or not possible to get raw data from a sound file?
View 5 RepliesDoes someone could tell me if it is or not possible to get raw data from a sound file?
View 5 RepliesI 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(); }
I have some reference data in a text file (~5MB) that I want to use with might android application.The file is of the format:
1|a|This is line 1a
1|b|This is line 1b
2|a|This is line 2a
2|b|This is line 2b
2|c|This is line 2c
What I want to know is the most efficient way (less memory, fast, size etc.) to use this file within my application.
a.) Should I save the file as a raw resource and open and read the whole file whenever I need a certain line.
b.) Should I convert the file to XML and use XPath to query the file when ever I need to look up a value
<!--sample XML -->
<data>
<line number="1">
<entry name="a">This is line 1 a</entry>
</line>
</data>
c.) Should I just copy & paste the whole file as a static string array in the application and use that.
[EDIT] I will also need to search this file and jump to arbitrary keywords e.g. "line 1a".
Is it possible to copy a file located on the sdcard to a package's internal filesytem located at /data/data/packagename/files/ folder?
View 3 Replies View RelatedI am saving an image using openFileOutput and now i want to use this image in my java script file.
View 9 Replies View RelatedI am using the following code trying to pull an .mp3 or .ogg file from my raw directory and saving it to the sd card and activating it as a ringtone. Although, it keeps failing for some reason or another and doesnt actually copy the new file to the sdcard.
CODE:...................
Can we play sound file in phone line (in background)?
View 4 Replies View RelatedI have a problem setting a ringtone from a resource in my app:
Uri uri = Uri.parse("android.resource://com.package.app/" + R.raw.sound1); RingtoneManager.setActualDefaultRingtoneUri(this, RingtoneManager.TYPE_RINGTONE, uri);
I've noticed also some people had the same problem but got no answers. Do any of you guys have any idea of how making this work? (without having to copy the file to the sdcard)
Is it possible to play a notification sound from a sound file inside the application package ?
Where should this file be stored in the apk (/res/raw or /assets) and what should be the URI to pass to the notification ?
notification.sound = Uri.parse(... ? ...);
Is there any way to play a sound file under Android browser?
View 1 Replies View RelatedIf the sound made when typing on Blackberry 10 devices can be used in the same way for Android devices?
View 4 Replies View RelatedHere is my AudioRecorder class, using audio record, why is it not producing any sound data?
import java.io.FileOutputStream; import java.io.IOException; import android.content.Context; import android.media.AudioFormat; import android.media.AudioRecord; import android.media.MediaRecorder; public class AudioRecorder implements Runnable {public boolean isRecording = false; byte[] tempBuffer = new byte[AudioRecord.getMinBufferSize(44100, AudioFormat.CHANNEL_CONFIGURATION_STEREO,......
I have created an basic sound recorder application using MediaRecorder class. It has 3 buttons i.e.
1.Record: Start recording
2.Stop: Stop recording
3.Play: Play recorded file ( 3gp format)
I can record any number of files using this. Each files gets name as audio1,audio2 ..etc.The problem is after recording the file I can play it using play button. But if I exit my application I am not able to see that file listed in music menu in emulator. But at the same time when i browse my sdcard using eclipse I can see the recorded audio file. ( I have aleady mounted sdcard image and can see other sdcard content in emulator)Now if I close the emulator and relaunch it I can see that file in emulator music menu. Now suppose that file name is audio1.3gp. If I record a sound using my app it will record it using name audio1.3gp on same location. This time if I goto music menu I can see audio1.3gp file with latest recorded audio.
I followed the effen manual to flash a new ROM for my HCT Desire HD on Monday, December 12th with absolute success. However, I have lost the start up sound file and when I boot my android, it boots in quiet mode. I searched for a solution and found many threads explaining how to disable it, but very little on how to enable it.
The problem is when I open my SDcard and look in the media/audio/notifications all I have is a facebook.mp3 file, I do not have any other files that would allow for the start up sound to open on boot.
I am trying to play the bigger size audio wav file(which is >20 mb) using the following code(AudioTrack) on my Android 1.6 HTC device which basically has less memory. But i found device crash as soon as it executes reading, writing and play. But the same code works fine and plays the lesser size audio wav files(10kb, 20 kb files etc) very well.
P.S: I should play PCM(.wav) buffer sound, the reason behind why i use AudioTrack here. Though my device has lesser memory, how would i read bigger audio files bytes by bytes and play the sound to avoid crashing due to memory constraints. Code...
Could someone guide me please to play the AudioTrack code for bigger size wav files?
I have the source code of an appli I had to make it works with HLS (.m3u8 files). It works well but there's still a problem.
When I click on Resume button, the bar goes to the specific time when I stopped playing but there is no sound ! ONLY with HLS, it work well with .mp4.
I guess it is due to seekTo() from MediaPlayer because when I disable that, the sound works well but of course, the stream starts at the beginning.
i like the sound ringtones and notification sounds on htc evo4g and would like them on my droid x does anyone have the sound file?
View 5 Replies View RelatedEvery time I get a jpeg message that has sound I have to open the picture and the sound separately and that takes away from the whole "funny" experience. Then what's the point in that.
View 2 Replies View RelatedI want to play sound file on phone line..Is it possible.If yes then how to do that..which class should i need to refer.
View 1 Replies View RelatedBlackberry user for the last 6 years. Just left the Storm & received my DInc today! A friend of mine sent me a mms with a sound file attached that I want to use when receiving text messages. I clicked the message & saved the file but cant seem to locate it anywhere. Anyone know how I can locate this file & set it as my default text sound?
View 12 Replies View RelatedWhy is that i can`t assign any MP3 file from SD card as ringtone or notification sound from settings tab?
View 1 Replies View RelatedIs there any program that can edit a sound file to make it louder when used on the g1?
View 1 Replies View RelatedI am having problems getting videos to play on my HTC Desire. I have converted my .avi files into Mpeg4 so as the device could read them ok. I'm using the free programme 'Handbrake' to convert the files. And it does so with no problems. The new mpeg4 files play with sound and image.
The problem occurs when I transfer the images onto the phones SD card. The video files are picked up via the camera folder (where you can play videos as there is no actual video player) as well as on the video player app I downloaded today - 'mVideoPlayer', without any problems but when I click to play the video the screen is black and only the sound works (even though on my pc the file played fine).
Do I need to download a codec or something? I would have thought that as the Desire was compatible with mpeg4 files that it would play them straight off without having to add software.
So does anyone know the location of the sound file for the double-beep camera focus? I found the "camera_click" and the "videorecord" sound files but don't see the one for the focus. It's not located in system/media/audio/ui like the other 2 camera sound files.
I really hate the double-beep focus sound and yes I know 3rd party camera applications will enable you to silence it but I was looking to just replace the sound file with a silent sound file instead.
First there is this:
Code:
File wave1 = new File(wavFile1);
if(!wave1.exists())
throw new Exception(wave1.getPath() + " - File Not Found");
[Code]...
but android dosen't support java.sound.sampled
there is also this:
Code:
private void merge2WavFiles(String wavFile1, String wavFile2, String newWavFilePath) {
long RECORDER_SAMPLERATE = 44100;
long RECORDER_BPP = 16;
[Code]...
but is also dosen't work.
In all cases the result sound file is empty without sound.
How can I merge two *.wav files?
Is is possible to assign a personal sound file to the gmail notification or am I stuck with the factory sound notifications?
View 11 Replies View RelatedI am new to android.What i did is i am creating a xml file with some data.Now i need to add some additional data to existing xml file dynamically.How can i done this..
View 1 Replies View RelatedThis is truly a beginner's question. I installed and successfully ran the notepad
tutorials Note pad v1,2,3 and typed in a few notes. Can i import data (manually )from an
external text file into the sq lite dbs? I looked in my Notepad workspace folders
but no dbs seem to have been created? I looked for anything with .db extension or
named 'data' as specified in the code.
Just wondering what would be the best way to grab the following data and parse it.Here's an example of some the data I want to pull.
<?xml version="1.0" encoding="UTF-8" ?>
<eveapi version="2">
<currentTime>2010-11-19 19:23:44</currentTime>
<result>
<rowset name="characters" key="characterID" columns="name,characterID,corporationName,corporationID">
<row name="jennyhills" characterID="90052591" corporationName="Imperial Academy" corporationID="1000166" />
</rowset>
</result>
<cachedUntil>2010-11-19 20:20:44</cachedUntil>
</eveapi>
I've seen some examples on how to parse XML data but they are all based on if statements and that's a lot of hard coding is there a more genertic way to do this?
how to read/write log data into a text file in android that file should be res folder.
View 5 Replies View Related