georgi / audite Goto Github PK
View Code? Open in Web Editor NEWPortable mp3 player for Ruby
Home Page: http://georgi.github.com/audite
License: MIT License
Portable mp3 player for Ruby
Home Page: http://georgi.github.com/audite
License: MIT License
I just installed audite with the instructions from the README:
apt-get install libportaudiocpp0 portaudio19-dev libmpg123-dev
gem install audite
Everything seemed to install correctly, but I get a couple of errors when running the example:
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_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ruby: symbol lookup error: /home/dj/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/audite-0.1.5/lib/mpg123.so: undefined symbol: mpg123_spf
Any ideas?
Thanks
I see that the last available gem version was released in January 2013: https://rubygems.org/gems/audite
Could you release a new version with all the changes from the last year?
Thank you!
audite test.mp3
Outputs :
/usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- curses (LoadError)
from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/gems/2.3.0/gems/audite-0.4.0/bin/audite:3:in `<top (required)>'
from /usr/local/bin/audite:23:in `load'
from /usr/local/bin/audite:23:in `<main>'
This causes the build to fail for me when using gem install
. See my comment on grobie/soundcloud2000 issue 58. Manually adding -lmpg123
to the Makefile and running make
again successfully builds portaudio.so
.
grobie/soundcloud2000#58 (comment)
$ gem install audite -- --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib
Building native extensions with: '--with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib'
This could take a while...
ERROR: Error installing audite:hal ERROR: Failed to build gem native extension.
/usr/bin/ruby.exe -r ./siteconf20160120-6292-bwquhm.rb extconf.rb --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib
checking for portaudio.h... yes
checking for main() in -lportaudio... yes
checking for PaStreamCallbackTimeInfo in portaudio.h... yes
creating Makefile
make "DESTDIR=" clean
rm -f
rm -f portaudio.so *.o *.bak mkmf.log .*.time
make "DESTDIR="
gcc -I. -I/usr/include/ruby-2.2.0 -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I. -DHAVE_PORTAUDIO_H -DHAVE_TYPE_PASTREAMCALLBACKTIMEINFO -I/usr/local/include -ggdb -O2 -pipe -Wimplicit-function-declaration -o portaudio.o -c portaudio.c
portaudio.c: In function ‘rb_portaudio_wait’:
portaudio.c:139:3: warning: implicit declaration of function ‘rb_thread_call_without_gvl’ [-Wimplicit-function-declaration]
rb_thread_call_without_gvl(portaudio_wait, portaudio, RUBY_UBF_IO, NULL);
^
rm -f portaudio.so
gcc -shared -o portaudio.so portaudio.o -L. -L/usr/lib -L/usr/local/lib -Wl,--export-all-symbols -Wl,--enable-auto-image-base,--enable-auto-import -lruby220 -lportaudio -lpthread -lgmp -ldl -lcrypt
portaudio.o: In function `rb_portaudio_write_from_mpg':
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:120: undefined reference to `mpg123_read'
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:120:(.text+0x4f6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `mpg123_read'
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:130: undefined reference to `mpg123_plain_strerror'
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:130:(.text+0x51e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `mpg123_plain_strerror'
collect2: error: ld returned 1 exit status
Makefile:254: recipe for target 'portaudio.so' failed
make: *** [portaudio.so] Error 1
make failed, exit code 2
I am on Mac OSX, with ruby- 1.9.3-p125
Playing a sample song works good, but on reaching end of mp3 I get following
`
playing sample.mp3 389 seconds of 390 total
Note: Illegal Audio-MPEG-Header 0x00000000 at offset 6222168.
Note: Trying to resync...
Note: Skipped 1024 bytes in input.
[parse.c:1159] error: Giving up resync after 1024 bytes - your stream is not nice... (maybe increasing resync limit could help).
A generic mpg123 error.
/Users/sward/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/audite-0.1.5/lib/audite.rb:101:in read' /Users/sward/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/audite-0.1.5/lib/audite.rb:101:in
read'
/Users/sward/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/audite-0.1.5/lib/audite.rb:43:in process' /Users/sward/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/audite-0.1.5/lib/audite.rb:32:in
block (2 levels) in start_thread'
/Users/sward/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/audite-0.1.5/lib/audite.rb:31:in loop' /Users/sward/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/audite-0.1.5/lib/audite.rb:31:in
block in start_thread'
Executing the sample player:
/home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
'require': Host error. (StandardError) from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /home/kalmbach/.rvm/gems/ruby-1.9.2-p320/gems/audite-0.1.5/lib/audite.rb:1:in<top (required)>' from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /home/kalmbach/.rvm/gems/ruby-1.9.2-p320/gems/audite-0.1.5/bin/audite:4:in
<top (required)>'
from /home/kalmbach/.rvm/gems/ruby-1.9.2-p320/bin/audite:19:inload' from /home/kalmbach/.rvm/gems/ruby-1.9.2-p320/bin/audite:19:in
from /home/kalmbach/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:ineval' from /home/kalmbach/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in
'
On IRB:
require 'audite'
'
StandardError: Host error.
from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from /home/kalmbach/.rvm/gems/ruby-1.9.2-p320/gems/audite-0.1.5/lib/audite.rb:1:in<top (required)>' from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in
require'
from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:inrescue in require' from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in
require'
from (irb):1
from /home/kalmbach/.rvm/rubies/ruby-1.9.2-p320/bin/irb:16:in `
Portaudio18 seems to be problematic. We need to find out under what conditions it performs well.
In order to have more confidence in using this gem, it would be great to add a test suite to ensure the library works and handles all error conditions correctly.
I have the right version of everything installed and using the executable audite mp3file.mp3 works alright, but when I try to run the example I get:
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
COMPLETE
POSITION: 1587.7600907029478 seconds level 0.0
And then it stops. I'm using Ubuntu.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.