GithubHelp home page GithubHelp logo

bindings-portaudio's Introduction

Twitter: @fumieval

Haskell

Name Stars Issues Merge Requests Status Hackage
barbies-th Stars Issues PRs CI Hackage
bindings-portaudio Stars Issues PRs CI Hackage
data-vector-growable Stars Issues PRs CI Hackage
deriving-aeson Stars Issues PRs CI Hackage
discord-vc-notification Stars Issues PRs CI Hackage
extensible Stars Issues PRs CI Hackage
incremental Stars Issues PRs CI Hackage
mason Stars Issues PRs CI Hackage
membership Stars Issues PRs CI Hackage
monad-skeleton Stars Issues PRs CI Hackage
objective Stars Issues PRs CI Hackage
tangle Stars Issues PRs CI Hackage
tehepero Stars Issues PRs CI Hackage
webauthn Stars Issues PRs CI Hackage
winery Stars Issues PRs CI Hackage
witherable Stars Issues PRs CI Hackage

bindings-portaudio's People

Contributors

christopherking42 avatar cosmo0920 avatar dsturnbull avatar erikd avatar fumieval avatar fuuzetsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bindings-portaudio's Issues

collect2: error: ld returned 1 exit status

Compiling with ghc-7.8.3, Linux Mint 17.
I installed bindings-portaudio with flag -fALSA, and while trying to compile exapmle/sine.hs, I got the error as follows:

~$ ghc -package-db=.cabal-sandbox/x86_64-linux-ghc-7.8.3-packages.conf.d/ example/sine.hs
Linking example/sine ...
/usr/bin/ld: ~/workspace/github/bindings-portaudio/.cabal-sandbox/lib/x86_64-linux-ghc-7.8.3/bindings-portaudio-0.0/libHSbindings-portaudio-0.0.a(pa_unix_util.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Suggestion: use 2D arrays instead of vectors

Currently, the library requires you to have a type constructor that is storable, applicative, and foldable. Moreover, you can't really make it variable length, so you need to hardcode the number of channels.

I suggest an alternative. Use a 2D array from here. The one dimension is time, and the other is the channel index. Specifically, it would use StorableArray (Int, Int) a where a is the sample type. (Also, Storable would become a superclass of the portaudio sample class to make the type signatures easier.) You might need to use unsafeForeignPtrToStorableArray.

Alternatively, simple lists could be used. The type would be [f a] for foldable f and sample type a, which would then be converted to [a]. This list is then written to an array using pokeArray.

No available API on x86_64 linux

bindings-portaudio/example$ example-portaudio 500 500
Initialization: 0
Available APIs:
Opening the default stream: -9985
example-portaudio: user error (Failed.)

The system has ALSA installed and flashplayer works well.
Any workaround?

Suggestion: Add a way to check if the stream is finished to System.PortAudio

I find the System.PortAudio module quite handy! I suggest adding a way to see if the stream is finished to it. Currently, the only way to figure out if the stream is done playing yet is to try to figure out the timing.

Perhaps the module should expose a "Stream" object, which can be stopped, started, and checked if finished. I also see that there is a way to make callbacks that are fired when the stream is finished, so that would be helpful too!

Please don't bundle portaudio

Installing dependencies is what package managers are for. Portaudio is an actively developed project which makes it even more troublesome as any fixes upstream won't immediately be reflected in this package.

Perhaps there's a deeper reason why you need to bundle it so please say so if that's the case.

PS: the link to portaudio in README is broken, after all, that project is not a Haskell one so it's not on Hackage.

Please release new version

The version on github exposes a System.PortAudio module, but the version on Hackage does not. Would be nice to see an updated version on Hackage.

Linking failure on OSX

https://gist.github.com/kazu-yamamoto/a6947c34aa19bde299df

% ghc hello-world.hs -L/usr/lib -L/opt/local/lib
Linking hello-world ...
Undefined symbols for architecture x86_64:
  "_PaUtil_AllocateMemory", referenced from:
      _Pa_Initialize in libHSbindings-portaudio-0.0.1.a(pa_front.o)
  "_PaUtil_FreeMemory", referenced from:
      _Pa_Initialize in libHSbindings-portaudio-0.0.1.a(pa_front.o)
      _Pa_Terminate in libHSbindings-portaudio-0.0.1.a(pa_front.o)
  "_PaUtil_InitializeClock", referenced from:
      _Pa_Initialize in libHSbindings-portaudio-0.0.1.a(pa_front.o)
  "_paHostApiInitializers", referenced from:
      _Pa_Initialize in libHSbindings-portaudio-0.0.1.a(pa_front.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

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.