pcm

Playing PCM stream from Web Audio API on Node.js

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm streaming recorded PCM audio from a browser with web audio api. I'm streaming it with binaryJS (websocket connection) to a nodejs server and I'm trying to play that stream on the server using the speaker npm module. This is my client. The audio buffers are at first non-interleaved IEEE 32-bit linear PCM with a nominal range between -1 and +1 . I take one of the two PCM channels to start off and stream it below. var client = new BinaryClient('ws://localhost:9000'); var Stream = client.send(); recorder.onaudioprocess = function(AudioBuffer

converting pcm file to mp3 using liblame in android

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using SimpleLameLibForAndroid to convert a pcm file that created using AudioRecord class in android,to mp3. I read the pcm file and encoded it into mp3 and then I write it in the file. the result mp3 file but is not correct and it has a lot of noise on it and really hard to understand that it was recorded pcm file. these are recorded audio specifications(pcm file): private static final int RECORDER_SAMPLERATE = 8000; private static final int RECORDER_CHANNELS = AudioFormat.CHANNEL_IN_MONO; private static final int RECORDER_AUDIO

Running pyfluidsynth + pyaudio demo, many problems with alsa and jack

匿名 (未验证) 提交于 2019-12-03 01:44:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm following the demo here . I'm very new to creating audio via python, so I'm not sure how to debug which errors I should consider, what naive things I might be doing wrong. Here are my python errors: >>> import time >>> import numpy >>> import pyaudio >>> import fluidsynth >>> >>> pa = pyaudio.PyAudio() ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd

JTransforms FFT in Android from PCM data

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been playing with this now for sometime, I cant work out what I am meant to be doing here. I am reading in PCM audio data into an audioData array: recorder.read(audioData,0,bufferSize); //read the PCM audio data into the audioData array I want to use Piotr Wendykier's JTransform library in order to preform an FFT on my PCM data in order to obtain the frequency. import edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D; At the moment I have this: DoubleFFT_1D fft = new DoubleFFT_1D(1024); // 1024 is size of array for (int i = 0; i I cant make

常用音频格式对应的采样率,每采样点bit数以及比特率

﹥>﹥吖頭↗ 提交于 2019-12-03 01:31:25
Format SamplesPerSec BitsPerSample BitsPerSec (格式) (采样频率) (每采样点bit数) (比特率或位率) MEDIA_FORMAT_WAV 8kHz 16 bits / sample 128 kbps MEDIA_FORMAT_PCM_8K 8kHz 16 bits / sample 128 kbps MEDIA_FORMAT_WAV_16K 16kHz 16 bits / sample 256 kbps MEDIA_FORMAT_PCM_16K 16kHz 16 bits / sample 256 kbps MEDIA_FORMAT_WAV_ALAW 8kHz 8 bits / sample 64 kbps MEDIA_FORMAT_WAV_ULAW 8kHz 8 bits / sample 64 kbps MEDIA_FORMAT_WAV_DVI_ADPCM 8kHz 4 bits / sample 32 kbps MEDIA_FORMAT_WAV_DVI_ADPCM_16K 16kHz 4 bits / sample 64 kbps 来源: https://www.cnblogs.com/passedbylove/p/11769267.html

FFMPEG for Android toolchains: arm-linux-armeabi-eabi-pkg-config - is there any toolchain in existence containing the pkg-config tool

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Does anybody know any toolchain for ffmpeg linux arm platform which contains the arm-linux-androideabi-pkg-config tool? The Android NDK does not contain it. Also has anybody succeeded in building ffmpeg for android that contains the alsa device? Please note that libasound is present on my Ubuntu x86 PC. After very extensive research visiting forums including ffmpeg.org, ffmpeg--nabbles, groups.google.com including the andro and android-ndk gropus, and the Internet in general, I have not succeeded in finding anyone who seems to know of its

List devices with PyAudio on Linux

匿名 (未验证) 提交于 2019-12-03 00:58:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When listing audio devices on Linux (I tried with Raspbian / RaspberryPi) with: import pyaudio p = pyaudio.PyAudio() for i in range(p.get_device_count()): print p.get_device_info_by_index(i) I get these errors. How to have a clean PyAudio running on Raspberry? ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or

Can ffmpeg convert audio from raw PCM to WAV?

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I can convert wav file to pcm ffmpeg -i file.wav -f s16le -acodec pcm_s16le file.pcm How can I revert this operation? 回答1: The wav container just adds a simple header to the raw PCM data. The header includes the format, sample rate, and number of channels. Since the raw PCM data does not include this information, you will need to specify it on the command line. Options are specified before the file they apply to, so options before the input file may be used to specify the format of the input file, and options after the input file and before

pcm原始数据绘制

匿名 (未验证) 提交于 2019-12-03 00:33:02
最近帮别人做了个东西,这里分享一下pcm原始数据绘图的思路 1、pcm数据采样位数,根据采样位数选取适合自己绘图的采样点的数量 2、计算出最大最小的的采样点的值差 3、根据要显示pcm数据的控件宽高,根据pcm原始数据的在pcm数据的偏移计算出x坐标,根据pcm数据采样的数值大小计算出y坐标 4、绘图,依次进行相邻数据点绘图 以下是在Duilb中绘图的代码: 1 std :: vector < char > pcm_buffer ; 2 FILE * file = NULL ; 3 file = fopen ( " pcm\\20180601155322.pcm " , " rb " ); 4 5 if ( file != NULL ) { 6 // 7 pcm_buffer . clear (); 8 pcm_buffer . shrink_to_fit (); 9 10 fseek ( file , 0 , SEEK_END ); 11 unsigned int size_byte = ftell ( file ); 12 fseek ( file , 0 , SEEK_SET ); 13 pcm_buffer . resize ( size_byte ); 14 fread (& pcm_buffer [ 0 ], size_byte , 1 , file ); 15

Android音视频 初始AudioTrack和PCM的录制与播放

匿名 (未验证) 提交于 2019-12-03 00:22:01
Audioϵͳ 先看看Audio里边有哪些东西?通过Android的SDK文档,发现主要有三个: AudioManager:这个主要是用来管理Audio系统的 AudioTrack:这个主要是用来播放声音的 AudioRecord:这个主要是用来录音的 其中AudioManager的理解需要考虑整个系统上声音的策略问题,例如来电话铃声,短信铃声等,主要是策略上的问题。 上一篇文章中已经讲述了audio’re’cord的使用,和相关参数的解释,没有看过的可以看一哈 音视频开发 原声方法生成PCM 以及PCM转为wav ,如果你本身已经对audiorecord有一定的了解,开始吧 ` static public int getMinBufferSize(int sampleRateInHz, int channelConfig, int audioFormat) public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat, int bufferSizeInBytes, int mode) ` 上篇文章中大部分参数都已经介绍过,现在只介绍新的参数 streamType 这个在构造AudioTrack的第一个参数中使用