Question about example-audio_stream.rb

28 views
Skip to first unread message

weber

unread,
May 11, 2014, 7:27:27 PM5/11/14
to ruby-...@googlegroups.com

I am running the example file "example-audio_stream.rb" and when the track ends I get the error "release for Plaything::OpenAL::Device failed: close_device failed with invalid_name".


Does this have something to do with the comment in the code that says:


#

# Global callback procs.

#

# They are global variables to protect from ever being garbage collected.

#

# You must not allow the callbacks to ever be garbage collected, or libspotify

# will hold information about callbacks that no longer exist, and crash upon

# calling the first missing callback. This is *very* important!


I assume this issue is related but I don't know how to fix it, any help?

Kim Burgestrand

unread,
May 12, 2014, 12:18:23 AM5/12/14
to Hallon on behalf of weber
I've only ever seen this error upon termination of the entire application. I believe it is because OpenAL somehow tracks the application terminating, and closing the device on it's own, causing a double-close when ruby tries to close it.

Do you see this error when a track stops playing, and not only when the entire program closes?

— Kim Burgestrand


--
You received this message because you are subscribed to the Hallon ruby gem mailing list.

- To view this group online, visit https://groups.google.com/d/forum/ruby-hallon
- To post to this group, send email to ruby-...@googlegroups.com
- To unsubscribe from this group, send email to ruby-hallon...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Hallon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-hallon...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bryan Weber

unread,
May 12, 2014, 8:50:51 AM5/12/14
to Hallon on behalf of Kim Burgestrand
At first I was just running the example from the command line but I added it to a rails application which remains running even after the track ends. That seems to fix the problem. 

Thanks.


You received this message because you are subscribed to a topic in the Google Groups "Hallon" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ruby-hallon/eDPr59UtfPo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ruby-hallon...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages