¡@

Home 

2014/10/16 ¤W¤È 08:21:24

android Programming Glossary: pcm

How to convert pcm samples in byte array as floating point numbers in the range -1.0 to 1.0 and back?

http://stackoverflow.com/questions/15087668/how-to-convert-pcm-samples-in-byte-array-as-floating-point-numbers-in-the-range

samples in the range 1.0 to 1.0 . The audio data is 16 bit PCM with samplerate 22khz . I want to downsample the audio from..

Playing an arbitrary tone with Android

http://stackoverflow.com/questions/2413426/playing-an-arbitrary-tone-with-android

amplitude final short val short dVal 32767 in 16 bit wav PCM first byte is the low order byte generatedSnd idx byte val 0x00ff.. AudioFormat.ENCODING_PCM_16BIT generatedSnd.length AudioTrack.MODE_STATIC audioTrack.write..

how to stream through mms://

http://stackoverflow.com/questions/3231893/how-to-stream-through-mms

How to encode a WAV to a mp3 on a Android device

http://stackoverflow.com/questions/3641920/how-to-encode-a-wav-to-a-mp3-on-a-android-device

a bounty What options are there for compressing raw PCM audio data to a mp3 on a Android device. My original post I'm.. a synthesiser on my Android phone and I've been generating PCM data to send to the speakers. Now I'm wondering if I can encode.. to the speakers. Now I'm wondering if I can encode this PCM data as a mp3 to save to the sdcard. The MediaRecorder object..

How to combine two audio files into one in Android

http://stackoverflow.com/questions/3844514/how-to-combine-two-audio-files-into-one-in-android

the following steps will work Using an AudioTrack. Decode PCM from audio files. Combine PCM. Are the above steps right if.. Using an AudioTrack. Decode PCM from audio files. Combine PCM. Are the above steps right if not what would be another way..

Creating a WAV file from raw PCM data using the Android SDK

http://stackoverflow.com/questions/4777181/creating-a-wav-file-from-raw-pcm-data-using-the-android-sdk

a WAV file from raw PCM data using the Android SDK I'm trying to use the AudioRecord.. a WAV file. The problem is that it only supplies the raw PCM data and if I write it to a file there is no header information.. Basically I used ByteArrayOutputStream to write the raw PCM data from AudioRecord which then lets me get the byte array..

Playing back sound coming from microphone in real-time

http://stackoverflow.com/questions/5728454/playing-back-sound-coming-from-microphone-in-real-time

private int audioFormat AudioFormat.ENCODING_PCM_16BIT private int bufferSize AudioRecord.getMinBufferSize samplingRate.. AudioFormat.ENCODING_PCM_16BIT bufferSize AudioTrack.MODE_STREAM if audioPlayer.getPlayState.. native Android audio is encoded . You can only play out PCM formats in real time or use a special streaming codec which..

Android audio FFT to retrieve specific frequency magnitude using audiorecord

http://stackoverflow.com/questions/5774104/android-audio-fft-to-retrieve-specific-frequency-magnitude-using-audiorecord

int format AudioFormat.ENCODING_PCM_16BIT int sampleSize 8000 int bufferSize AudioRecord.getMinBufferSize.. proper size final int bytesPerSample 2 As it is 16bit PCM final double amplification 100.0 choose a number as you like..

How to merge two mp3 files into one (combine/join)

http://stackoverflow.com/questions/6731155/how-to-merge-two-mp3-files-into-one-combine-join

of channels. To do this we would need to decode MP3 get PCM samples process it to change sampling frequency and then re..

Android: Need to record mic input

http://stackoverflow.com/questions/6959930/android-need-to-record-mic-input

8000 AudioFormat.CHANNEL_IN_MONO AudioFormat.ENCODING_PCM_16BIT recorder new AudioRecord AudioSource.MIC 8000 AudioFormat.CHANNEL_IN_MONO.. 8000 AudioFormat.CHANNEL_IN_MONO AudioFormat.ENCODING_PCM_16BIT N 10 track new AudioTrack AudioManager.STREAM_MUSIC 8000.. 8000 AudioFormat.CHANNEL_OUT_MONO AudioFormat.ENCODING_PCM_16BIT N 10 AudioTrack.MODE_STREAM recorder.startRecording track.play..

Saving audio input of Android Stock speech recognition engine

http://stackoverflow.com/questions/8583406/saving-audio-input-of-android-stock-speech-recognition-engine

20 14 41 34.007 DEBUG AudioHardwareALSA 2364 Set PLAYBACK PCM format to S16_LE Signed 16 bit Little Endian 12 20 14 41 34.007.. haven't included your code for actually writing out the PCM data so its hard to diagnose but if you are hearing strange.. your bytes directly to a file without any header raw PCM data . This way you can rule out any errors when writing your..

Android 2.2 MediaPlayer is working fine with one SHOUTcast URL but not with the other one

http://stackoverflow.com/questions/8681550/android-2-2-mediaplayer-is-working-fine-with-one-shoutcast-url-but-not-with-the

can use ffmpeg opencore or faad2 library to decode it into PCM and play using audiotrack . Reference share improve this answer..

How to convert pcm samples in byte array as floating point numbers in the range -1.0 to 1.0 and back?

http://stackoverflow.com/questions/15087668/how-to-convert-pcm-samples-in-byte-array-as-floating-point-numbers-in-the-range

to convert pcm samples in byte array as floating point numbers in the range..

Playing an arbitrary tone with Android

http://stackoverflow.com/questions/2413426/playing-an-arbitrary-tone-with-android

2 Math.PI i sampleRate freqOfTone convert to 16 bit pcm sound array assumes the sample buffer is normalised. int idx..

Basic streaming audio works in 2.1 but not in 2.2

http://stackoverflow.com/questions/3937610/basic-streaming-audio-works-in-2-1-but-not-in-2-2

65 Calling connect ... I AudioHardwareQSD 65 AudioHardware pcm playback is going to standby. D StreamProcess 65 OutputStreamProcess..

Android AudioRecord questions?

http://stackoverflow.com/questions/4707994/android-audiorecord-questions

your time and responses thanks dk android audio pcm audiorecord sample rate share improve this question It's..

Creating a WAV file from raw PCM data using the Android SDK

http://stackoverflow.com/questions/4777181/creating-a-wav-file-from-raw-pcm-data-using-the-android-sdk

support either WAV or MP3 formats. android audio wav pcm audiorecord share improve this question OK I've got this..

How to decode audio via FFmpeg in Android

http://stackoverflow.com/questions/5367595/how-to-decode-audio-via-ffmpeg-in-android

Side You need to read the frames and convert them into raw pcm format first and then start filling the audio buffer continuously...

PCM audio amplitude values?

http://stackoverflow.com/questions/5890499/pcm-audio-amplitude-values

the data values are. iphone android audio audio recording pcm share improve this question Think of the surface of the..

JTransforms FFT in Android from PCM data

http://stackoverflow.com/questions/7649003/jtransforms-fft-in-android-from-pcm-data

off anything would be greatly appreciated Ben android fft pcm share improve this question If you're just looking for the..

How to get frequency from fft result?

http://stackoverflow.com/questions/7674877/how-to-get-frequency-from-fft-result

5th fret of my guitar at roughly 440Hz . java android fft pcm share improve this question The complex data is interleaved..

How to convert pcm samples in byte array as floating point numbers in the range -1.0 to 1.0 and back?

http://stackoverflow.com/questions/15087668/how-to-convert-pcm-samples-in-byte-array-as-floating-point-numbers-in-the-range

algorithm i use expects float array containing input samples in the range 1.0 to 1.0 . The audio data is 16 bit PCM with samplerate 22khz . I want to downsample the audio from 22khz to 8khz how to represent the samples in byte array as..

Playing an arbitrary tone with Android

http://stackoverflow.com/questions/2413426/playing-an-arbitrary-tone-with-android

int idx 0 for final double dVal sample scale to maximum amplitude final short val short dVal 32767 in 16 bit wav PCM first byte is the low order byte generatedSnd idx byte val 0x00ff generatedSnd idx byte val 0xff00 8 void playSound final.. new AudioTrack AudioManager.STREAM_MUSIC sampleRate AudioFormat.CHANNEL_CONFIGURATION_MONO AudioFormat.ENCODING_PCM_16BIT generatedSnd.length AudioTrack.MODE_STATIC audioTrack.write generatedSnd 0 generatedSnd.length audioTrack.play ..

how to stream through mms://

http://stackoverflow.com/questions/3231893/how-to-stream-through-mms

How to encode a WAV to a mp3 on a Android device

http://stackoverflow.com/questions/3641920/how-to-encode-a-wav-to-a-mp3-on-a-android-device

a mp3 on a Android device I'm simplified my question and offered a bounty What options are there for compressing raw PCM audio data to a mp3 on a Android device. My original post I'm creating a synthesiser on my Android phone and I've been generating.. to a mp3 on a Android device. My original post I'm creating a synthesiser on my Android phone and I've been generating PCM data to send to the speakers. Now I'm wondering if I can encode this PCM data as a mp3 to save to the sdcard. The MediaRecorder.. on my Android phone and I've been generating PCM data to send to the speakers. Now I'm wondering if I can encode this PCM data as a mp3 to save to the sdcard. The MediaRecorder object can encode audio coming from the microphone into various formats..

How to combine two audio files into one in Android

http://stackoverflow.com/questions/3844514/how-to-combine-two-audio-files-into-one-in-android

B audio file AB audio file After searching around I think the following steps will work Using an AudioTrack. Decode PCM from audio files. Combine PCM. Are the above steps right if not what would be another way to achieve it Is there an example.. After searching around I think the following steps will work Using an AudioTrack. Decode PCM from audio files. Combine PCM. Are the above steps right if not what would be another way to achieve it Is there an example and Library source available..

Creating a WAV file from raw PCM data using the Android SDK

http://stackoverflow.com/questions/4777181/creating-a-wav-file-from-raw-pcm-data-using-the-android-sdk

a WAV file from raw PCM data using the Android SDK I'm trying to use the AudioRecord class to record a WAV file. The problem is that it only supplies.. SDK I'm trying to use the AudioRecord class to record a WAV file. The problem is that it only supplies the raw PCM data and if I write it to a file there is no header information so it will not play in any media player. How can I create.. blog 2008 08 29 reading and writing wav files in java Basically I used ByteArrayOutputStream to write the raw PCM data from AudioRecord which then lets me get the byte array and its size when the process is done. I can then use that data..

Playing back sound coming from microphone in real-time

http://stackoverflow.com/questions/5728454/playing-back-sound-coming-from-microphone-in-real-time

in Hz private int channelConfig AudioFormat.CHANNEL_CONFIGURATION_MONO private int audioFormat AudioFormat.ENCODING_PCM_16BIT private int bufferSize AudioRecord.getMinBufferSize samplingRate channelConfig audioFormat private int sampleNumBits.. new AudioTrack AudioManager.STREAM_MUSIC 44100 AudioFormat.CHANNEL_CONFIGURATION_MONO AudioFormat.ENCODING_PCM_16BIT bufferSize AudioTrack.MODE_STREAM if audioPlayer.getPlayState AudioTrack.PLAYSTATE_PLAYING audioPlayer.play capture.. record audio recording share improve this question All native Android audio is encoded . You can only play out PCM formats in real time or use a special streaming codec which I don't think is trivial on Android. The point is that if you..

Android audio FFT to retrieve specific frequency magnitude using audiorecord

http://stackoverflow.com/questions/5774104/android-audio-fft-to-retrieve-specific-frequency-magnitude-using-audiorecord

using the AudioRecord class int channel_config AudioFormat.CHANNEL_CONFIGURATION_MONO int format AudioFormat.ENCODING_PCM_16BIT int sampleSize 8000 int bufferSize AudioRecord.getMinBufferSize sampleSize channel_config format AudioRecord audioInput.. look something like this double micBufferData new double insert proper size final int bytesPerSample 2 As it is 16bit PCM final double amplification 100.0 choose a number as you like for int index 0 floatIndex 0 index bytesRecorded bytesPerSample..

How to merge two mp3 files into one (combine/join)

http://stackoverflow.com/questions/6731155/how-to-merge-two-mp3-files-into-one-combine-join

to ensure both files have same sampling frequency and number of channels. To do this we would need to decode MP3 get PCM samples process it to change sampling frequency and then re encode to MP3. From what I know android does not have transcode..

Android: Need to record mic input

http://stackoverflow.com/questions/6959930/android-need-to-record-mic-input

and start playback. try int N AudioRecord.getMinBufferSize 8000 AudioFormat.CHANNEL_IN_MONO AudioFormat.ENCODING_PCM_16BIT recorder new AudioRecord AudioSource.MIC 8000 AudioFormat.CHANNEL_IN_MONO AudioFormat.ENCODING_PCM_16BIT N 10 track.. recorder new AudioRecord AudioSource.MIC 8000 AudioFormat.CHANNEL_IN_MONO AudioFormat.ENCODING_PCM_16BIT N 10 track new AudioTrack AudioManager.STREAM_MUSIC 8000 AudioFormat.CHANNEL_OUT_MONO AudioFormat.ENCODING_PCM_16BIT.. N 10 track new AudioTrack AudioManager.STREAM_MUSIC 8000 AudioFormat.CHANNEL_OUT_MONO AudioFormat.ENCODING_PCM_16BIT N 10 AudioTrack.MODE_STREAM recorder.startRecording track.play Loops until something outside of this thread stops..

Saving audio input of Android Stock speech recognition engine

http://stackoverflow.com/questions/8583406/saving-audio-input-of-android-stock-speech-recognition-engine

logcat I find first Set PLAYBACK sample rate to 44100 HZ 12 20 14 41 34.007 DEBUG AudioHardwareALSA 2364 Set PLAYBACK PCM format to S16_LE Signed 16 bit Little Endian 12 20 14 41 34.007 DEBUG AudioHardwareALSA 2364 Using 2 channels for PLAYBACK... wav voice recognition share improve this question You haven't included your code for actually writing out the PCM data so its hard to diagnose but if you are hearing strange noises then it looks most likely you have the wrong endian when.. or endianess of your byte stream. To know for sure just stream your bytes directly to a file without any header raw PCM data . This way you can rule out any errors when writing your file header. Then use Audacity to import the raw data experimenting..

Android 2.2 MediaPlayer is working fine with one SHOUTcast URL but not with the other one

http://stackoverflow.com/questions/8681550/android-2-2-mediaplayer-is-working-fine-with-one-shoutcast-url-but-not-with-the

How to convert pcm samples in byte array as floating point numbers in the range -1.0 to 1.0 and back?

http://stackoverflow.com/questions/15087668/how-to-convert-pcm-samples-in-byte-array-as-floating-point-numbers-in-the-range

to convert pcm samples in byte array as floating point numbers in the range 1.0 to 1.0 and back The resampling algorithm i use expects..

Playing an arbitrary tone with Android

http://stackoverflow.com/questions/2413426/playing-an-arbitrary-tone-with-android

fill out the array for int i 0 i numSamples i sample i Math.sin 2 Math.PI i sampleRate freqOfTone convert to 16 bit pcm sound array assumes the sample buffer is normalised. int idx 0 for final double dVal sample scale to maximum amplitude..

Basic streaming audio works in 2.1 but not in 2.2

http://stackoverflow.com/questions/3937610/basic-streaming-audio-works-in-2-1-but-not-in-2-2

I HTTPDataSource 65 Retry ... 0 times left W HTTPStream 65 Calling connect ... I AudioHardwareQSD 65 AudioHardware pcm playback is going to standby. D StreamProcess 65 OutputStreamProcess ResetAOLC W HTTPStream 65 Returned from connect .....

Android AudioRecord questions?

http://stackoverflow.com/questions/4707994/android-audiorecord-questions

experience this as well. Does anyone have a solution I appreciated your time and responses thanks dk android audio pcm audiorecord sample rate share improve this question It's been a while since this question was asked so I don't know..

Creating a WAV file from raw PCM data using the Android SDK

http://stackoverflow.com/questions/4777181/creating-a-wav-file-from-raw-pcm-data-using-the-android-sdk

and I know that MediaRecorder can'y be used because it doesn't support either WAV or MP3 formats. android audio wav pcm audiorecord share improve this question OK I've got this figured out. This post was crucial in helping me http computermusicblog.com..

How to decode audio via FFmpeg in Android

http://stackoverflow.com/questions/5367595/how-to-decode-audio-via-ffmpeg-in-android

code .................... .................... On native Side You need to read the frames and convert them into raw pcm format first and then start filling the audio buffer continuously. When the buffer is full it will automatically play. JNIEXPORT..

PCM audio amplitude values?

http://stackoverflow.com/questions/5890499/pcm-audio-amplitude-values

it. I found webpages on the PCM file format but not what the data values are. iphone android audio audio recording pcm share improve this question Think of the surface of the microphone. When it's silent the surface is motionless at position..

JTransforms FFT in Android from PCM data

http://stackoverflow.com/questions/7649003/jtransforms-fft-in-android-from-pcm-data

to perform any calculations after this I'm sure I'm way off anything would be greatly appreciated Ben android fft pcm share improve this question If you're just looking for the frequency of a single sinusoidal tone in the input waveform..

How to get frequency from fft result?

http://stackoverflow.com/questions/7674877/how-to-get-frequency-from-fft-result

sound recorded was me playing an 'A' on the bottom string 5th fret of my guitar at roughly 440Hz . java android fft pcm share improve this question The complex data is interleaved with real components at even indices and imaginary components..