pcm

J2ME/Blackberry - get audio signal amplitude level?

我们两清 提交于 2019-12-12 09:13:46
问题 Is it possible in j2me to measure signal amplitude of audio record made by JSR-135 Player? I know I can access buffer, but then what? Target model Bold 9000, supported formats PCM and AMR. Which format I should use? See also Blackberry Audio Recording Sample Code How To - Record Audio on a BlackBerry smartphone Thank you! 回答1: Get raw PCM signal level Use menu and trackwheel to zoom in/out and move left/right within graph. Audio format: raw 8000 Hz 16 bit mono pcm. Tested on Bold 9000 RIM OS

Visualizing volume of PCM samples

廉价感情. 提交于 2019-12-12 09:13:31
问题 I have several chunks of PCM audio (G.711) in my C++ application. I would like to visualize the different audio volume in each of these chunks. My first attempt was to calculate the average of the sample values for each chunk and use that as an a volume indicator, but this doesn't work well. I do get 0 for chunks with silence and differing values for chunks with audio, but the values only differ slighly and don't seem to resemble the actual volume. What would be a better algorithem calculate

Convert PCM to MP3/OGG

一个人想着一个人 提交于 2019-12-12 09:12:23
问题 I need to convert a continuous stream of PCM, or encoded audio (ADPCM, uLaw, Opus), into MP3/OGG format so that it can be streamed to a browser (using html's audio tag). I have the "stream-mp3/ogg-using-audio-tag" part working, now I need to develop the conversion layer. I have two questions: How can I convert PCM into MP3/OGG using NAudio and/or some other C# library/framework? I assume there is a code snippet or two in the NAudio demo app that may be doing this, but I haven't been able to

Issue encoding and decoding an audio recording to G711 ( PCMU - uLaw) format

吃可爱长大的小学妹 提交于 2019-12-12 08:36:00
问题 There isn't too much info about apply this codec when we need to streaming audio. Without apply the codec, my code work like a charm establishing a communication between 2 devices but I need encode/decode in that format because I will need streaming with the server and not between two devices (I am testing this code using 2 devices). I am looking for the chance if anyone of your could see where is the key of my problem. I've tried different configurations of the input parameters. Maybe, the

Using FFT in Android

扶醉桌前 提交于 2019-12-12 04:14:57
问题 I am having trouble understanding how I should pass PCM data from the mic to this FFT class I am using made by Piotr Wendykier (it's the DoubleFFT_1D class in JTransforms). I think I have to return a real and imaginary number and then double the real number to eventually obtain Frequency = 8000 * i / 1024 where i is the index of the highest magnitude. Can someone help me in finding the frequency of a note played in? I have a recording class as follows: import edu.emory.mathcs.jtransforms.fft

Downsampling pcm/wav audio from 22khz to 8khz

这一生的挚爱 提交于 2019-12-11 18:26:51
问题 My android application needs to convert PCM(22khz) to AMR , but the API AmrInputStream only supports with pcm of 8khz . How can i downsample the pcm from 22 khz to 8 khz? 回答1: The sample rate is hard coded in AmrInputStream.java. // frame is 20 msec at 8.000 khz private final static int SAMPLES_PER_FRAME = 8000 * 20 / 1000; So you have to convert the PCM to AMR first. InputStream inStream; inStream = new FileInputStream(wavFilename); AmrInputStream aStream = new AmrInputStream(inStream); File

How to trim PCM data to identify sample count or frame count to feed?

亡梦爱人 提交于 2019-12-11 18:12:43
问题 I want to feed libsamplerate (a library to downsample audio data which needs the following struct filled: typedef struct { float *data_in, *data_out ; long input_frames, output_frames ; long input_frames_used, output_frames_gen ; int end_of_input ; double src_ratio ; } SRC_DATA ; The fields of this struct which must be filled in by the caller are: data_in : A pointer to the input data samples. input_frames : The number of frames of data pointed to by data_in. data_out : A pointer to the

IOS - Decode PCM byte array

我的未来我决定 提交于 2019-12-11 09:39:08
问题 Im stuck on an issue on my objective C App. I'm reading a byte array from a serveur (Socket c#) who send me an PCM encoded sound, and i'm currently looking for a sample code that decode for me this byte array (NSData), and play it. Does anyone know a solution ? Or how can I read a u-Law audio? Thanks a lot ! :D 回答1: This link has information about mu-law encoding and decoding: http://dystopiancode.blogspot.com.es/2012/02/pcm-law-and-u-law-companding-algorithms.html #define MULAW_BIAS 33 /* *

Recorded audio Using AndroidRecord API fails to play

霸气de小男生 提交于 2019-12-11 08:39:46
问题 Am developing an android app that has the feature to record the user speech. For this I have used the AndroidRecord Audio API. Currently the pcm file(recorded audio file - recordedAudio.pcm) getting generated successfully in the sd card. But am not able to play that file. I tried in PC also with windows media palyer and some other players. But nothing helps. Following are my code snippet . private int minBufSize; private AudioRecord recorder; private int sampleRate = 44100; private int

What is the algorithm of converting pcm to adpcm?

邮差的信 提交于 2019-12-11 06:39:09
问题 What is the algorithm of converting pcm to adpcm? 回答1: ADPCM refers to a family of compression algorithms (mostly used for voice compression on phone lines). Sometimes known as G.721 and G.732 (and others). See http://www.javvin.com/protocolG7xx.html for more information. The spec for IMA ADPCM, which is the one that Microsoft implemented on Windows is available as photo-scans at Columbia university http://www.cs.columbia.edu/~hgs/audio/dvi/ PCM is uncompressed audio. 来源: https:/