Giter VIP home page Giter VIP logo

playrec's People

Contributors

robhumphrey avatar seebk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

playrec's Issues

Using Playrec for a real-time audio processing

Hi everyone,
I just wanted to announce that I have made an abstraction layer on top or playrec for doing real-time audio processing in Matlab/Octave. The code is available in our toolbox
http://ltfat.sourceforge.net/

It is really simple to use. The following example takes an input from a microphone and routes it trough the loop to the speakers allowing setting gain in a range of -20 to 20 dB.

block('playrec');
p = blockpanel({'GdB','Gain',-20,20,0,21});
while p.flag
gain = blockpanelget(p,'GdB');
f = blockread();
% You can do anything to f here
blockplay(f*10^(gain/20));
end
blockdone(p);

I tried to make it as versatile as possible. For anyone interested, here are some links:
http://ltfat.sourceforge.net/doc/blockproc_central.php
http://ltfat.sourceforge.net/doc/blockproc/block.php

I would appreciate any feedback.
Thanks
Zdenek

PortAudio Error [-9999]: Unanticipated host error

Hello,

I complied playrec for Octave v6.3.0 and Windows 10 with portaudio v19.7.0 and ASIO SDK v2.3.3. The compilation was successful (I got the playrec.mex file). I have the following devices available (result of the playrec('getDevices') command):

deviceID = 0, name = ASIO4ALL v2, hostAPI = ASIO
deviceID = 1, name = Realtek ASIO, hostAPI = ASIO

When I run the following command for initialization:

playrec('init',48000,1,-1)

I get the following error message:

error: playrec: Init failed to open PortAudio stream
{PortAudio Error [-9999]: Unanticipated host error}

When I ignore this error message and just run the initialization command again, I do not get the error again and I successfully initialize the device. The device after that works perfectly fine. I seriously do not understand why???

Can somebody please help me? How can I resolve this error?

Thank you very much.

Best regards

Installation / compilation fails on Linux with GNU Octave

I followed the instructions on http://www.playrec.co.uk/compiling.html to install Playrec on my Ubuntu 17.04 Linux machine with GNU Octave 4.0.3. However, compiling Playrec failed with some unexpected reference to mac_osx.

The output from the Octave command line and the contents of the (relevant?) portaudio directory is shown below.

**** Octave output ****
>> compile_playrec
Please select the options required when compiling Playrec:
PortAudio installation directory [/home/mbrennwa/Desktop/playrec/lib/portaudio/]:
Use debug mode [Y]:
Use verbose mode [Y]:
Use case insensitive function names [N]:
Use Advanced Linux Sound Architecture (ALSA) [N]: y
Use AudioScience HPI [N]:
Use Jack Audio Connection Kit (JACK) [N]:
Use Open Sound System (OSS) [N]:
build_mex: Unable to find '/home/mbrennwa/Desktop/playrec/lib/portaudio/src/os/mac_osx'
Compiling Playrec failed, see the Command Window for more information.

**** portaudio files in .../src/os/ ****
ls -l /home/mbrennwa/Desktop/playrec/lib/portaudio/src/os/
total 8
drwxr-xr-x 2 mbrennwa mbrennwa 4096 Okt 30 02:23 unix
drwxr-xr-x 2 mbrennwa mbrennwa 4096 Okt 30 02:23 win

-std=c99 option leads to compile errors for ALSA API

Hi everyone,

I am using:

  • Lubuntu 14.10
  • MATLAB R2014a
  • libasound2-dev 1.0.28-1
  • portaudio v19, January 30, 2014, SVN rev 1919
  • playrec, commit 48b4f6a
  • gcc 4.9.1

According to https://github.com/PlayrecForMatlab/playrec/blob/master/m_files/build_mex.m#L27-28
the --std=c99 option is needed for portaudio. However it causes compile errors, if the ALSA API is selected via the GUI. The errors are due to the fact, that the source code of the portaudio's ALSA API uses "typeof". This is a an extension of the C-Standard, which is not accepted by the compiler, when specifying the ISO C99 Standard (--std=c99). Removing L28 does surprisingly solve the problem.

Debian Stretch and Matlab 2016b

After the update to Debian Stretch playrec is not working out of the box so I recompiled the playrec mex file. Unfortunately, this was not working without some glitches.

These are the step that at least made the jack audio (JACK) backend work for me. I had no luck with ALSA. I didn't invest a lot of time, though, since I am happy with JACK.

Issue 1

Issue 2

  • Problem 2
    Portaudio is using C++ like Comments, but mex defaults to ANSI C.

  • Solution 2
    uncomment L40 and modify it that is looks like below (remove the escape \) :
    build_args = {'CFLAGS="$CFLAGS -std=c99"', build_args{:}};

After this playrec with only the Jack Audio Connection Kit (JACK) Backend (API) activated, compiles with only a few deprecation warnings.

Issue 3

  • Problem 3
    When using the updated playrec.mexa64 we see the following error:
    playrec.mexa64: .../matlab/R2016b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libjack.so.0).

  • Solution 3 (from: 329796-issue-with-libstdc-so-6)
    start Matlab with:
    LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" matlab

CoreAudio not detected (OS X 10.11.4)

I am having a strange issue, where the CoreAudio option is greyed out when i run compile_playrec.m on a machine running OS X 10.11.4 and MATLAB 2016a.

If anyone has an idea for a solution I'd be happy to hear about it.

Playrec and Matlab 2017

We were using a compiled 'playrec.mexmaci64' version of the Playrec with 2015/16 Matlab, and it worked well. Someone else had compiled it for us to include Mac's 'CoreAudio' as I couldn't get to include CoreAudio in the Playrec's compilation process.

I switched to Matlab 2017a, and unfortunatley the compiled Playrec is unresponsive. I have started a service request with Matlab to see if they can point us to what might be causing this. I will update what they say. But, if anyone has similar experience and have gotten Playrec to work for the 2017 Matlab and are willing to share details it would be great!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.