portaudio

How to build Port Audio using mingw and msys?

ε祈祈猫儿з 提交于 2020-01-16 19:24:07
问题 I have problem building Port Audio on windows machine. I am following this tutorial: http://portaudio.com/docs/v19-doxydocs/compile_windows_mingw.html Running make after ./configure runs build process and finally outputs this message and that is where build process stop. /bin/sh ./libtool --mode=link gcc -shared -rpath /usr/local/lib -no-undefined - export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" -version-inf o 2:0:0 -o lib/libportaudio.la src/common/pa_allocation.lo src

speex decoding going wrong

送分小仙女□ 提交于 2020-01-13 05:54:50
问题 I'm using speex to encode some audio data and send it over UDP, and decode it on the other side. I ran a few tests with speex, and noticed that if I decode a packet straight after I encoded it, the decoded data is in no way close to the original data. Most of the bytes at the start of the buffer are 0. So when I decode the audio sent over UDP, all I get is noise. This is how I am encoding the audio: bool AudioEncoder::encode( float *raw, char *encoded_bits ) { for ( size_t i = 0; i < 256; i++

Why does PortAudio not play nicely with other audio programs or how can I get it to?

人走茶凉 提交于 2020-01-02 10:17:34
问题 I am trying to write an audio application using PortAudio, but if any other audio programs (usually Firefox) are running at the time which I try to run my program, I get the following error: PaHost_OpenStream: could not open /dev/dsp for O_WRONLY PaHost_OpenStream: ERROR - result = -10000 An error occured while using the portaudio stream Error number: -10000 Error message: Host error. Obviously, this makes my program pretty useless since it won't work if another program is using sound. Is

Continuous recording in PortAudio (from mic or output)

那年仲夏 提交于 2020-01-01 09:38:11
问题 I am trying to create a music visualizer application in PortAudio, I did some basic research and found some examples on how to record from a mic to a (temporary) file. But there was no example where the data is not used runtime during the recording. So how can I start a continuous audio-stream where I can catch the data from the current "frame"? This is how I tried to do it: #include <stdio.h> #include <unistd.h> #include <time.h> #include <stdlib.h> #include "portaudio.h" #define SAMPLE_RATE

Generating smooth audio from Python on a low-powered computer

假装没事ソ 提交于 2019-12-31 02:43:07
问题 I am trying to write a simple audio function generator in Python, to be run on a Raspberry Pi (model 2). The code essentially does this: Generate 1 second of the audio signal (say, a sine wave, or a square wave, etc) Play it repeatedly in a loop For example: import pyaudio from numpy import linspace,sin,pi,int16 def note(freq, len, amp=1, rate=44100): t = linspace(0,len,len*rate) data = sin(2*pi*freq*t)*amp return data.astype(int16) # two byte integers RATE = 44100 FREQ = 261.6 pa = pyaudio

Windows virtual microphone in C

限于喜欢 提交于 2019-12-25 18:27:38
问题 I asked a similar question a while ago but I didn't know very much, so I wasn't able to be specific enough. I want to write a program that takes input from my microphone, processes it, and then sends the output to a fake "virtual microphone" as if the processed sound I created was what a microphone was hearing. I would then like to be able to use this virtual microphone with any application that supports choosing your microphone input (pretty much any well written software) as a valid

How to use portAudio to read audio data output from sound card?

旧街凉风 提交于 2019-12-25 14:48:15
问题 I was wondering if it is possible to read data that is going from the sound card to the speakers with the PortAudio API. After looking through the documentation, I found an example (http://portaudio.com/docs/v19-doxydocs/paex__record_8c_source.html) where they read data from the microphone. However, I would like to be able to capture the audio that is coming from the sound card. Is there a way to do this in PortAudio and if not please point me in the right direction. Also, it is important

Fail to Link Portaudio Library

旧城冷巷雨未停 提交于 2019-12-25 12:40:12
问题 I have made a simple Makefile project using Portaudio libraries and the project has been working fine with the following Makefile: CXXFLAGS = -O2 -g -Wall -fmessage-length=0 OBJS = RecAudio.o LIBS = ../Portaudio/portaudio/lib/.libs/libportaudio.a -lpthread -lrt -lasound #LIBS = -lportaudio -lpthread -lrt -lasound TARGET = RecAudio $(TARGET): $(OBJS) $(CXX) -o $(TARGET) $(OBJS) $(LIBS) all: $(TARGET) clean: rm -f $(OBJS) $(TARGET) I'll try to integrate Portaudio libraries into another project

Low Pass filter in C

自古美人都是妖i 提交于 2019-12-25 06:59:15
问题 I'm implementing a low pass filter in C wih the PortAudio library. I record my microphone input with a script from PortAudio itself. There I added the following code: float cutoff = 4000.0; float filter(float cutofFreq){ float RC = 1.0/(cutofFreq * 2 * M_PI); float dt = 1.0/SAMPLE_RATE; float alpha = dt/(RC+dt); return alpha; } float filteredArray[numSamples]; filteredArray[0] = data.recordedSamples[0]; for(i=1; i<numSamples; i++){ if(i%SAMPLE_RATE == 0){ cutoff = cutoff - 400; } data

Using Portaudio on osx 10.9 in Xcode 5 - Undefined symbols for architecture x86_64

为君一笑 提交于 2019-12-25 02:22:17
问题 I am trying to use Portaudio on OSX 10.9 in Xcode 5, but am running into some issues. I have downloaded the source, rand ./configure and make, included the include folder in my xcode project, and ran Pa_Initialize() to get this error. I have tried setting the architectures in the xcode build settings from "Standard Architectures (64-bit Intel)(x86_64)" to "Universal (32/64-bit Intel)(x86_64, i386)" with no success. I have followed instructions/solutions here, here and here but have found no