Git Product home page Git Product logo

Comments (11)

jbclements avatar jbclements commented on August 30, 2024

Indeed. I think the next step would be to try running the files required by rsound/main, one at a time. You could also begin at the other end, by requiring portaudio/portaudio; if that fails, there would be no need to look at rsound.

from rsound.

pmatos avatar pmatos commented on August 30, 2024

thanks fort

Indeed. I think the next step would be to try running the files required by rsound/main, one at a time. You could also begin at the other end, by requiring portaudio/portaudio; if that fails, there would be no need to look at rsound.

Thanks for the tips - i will look into that.

from rsound.

pmatos avatar pmatos commented on August 30, 2024

Interesting - requiring utils.rkt is enough to trigger this.

Welcome to Racket v8.3.0.8 [cs].
> (require "rsound/util.rkt")
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_
lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
; Assertion #<procedure:negative?> failed on 0.0 [,bt for context]
> 

Will have to investigate this file further.

from rsound.

pmatos avatar pmatos commented on August 30, 2024

ah, you won't even believe this:

> (require (only-in math/base power-of-two?))
Assertion #<procedure:negative?> failed on 0.0

from rsound.

soegaard avatar soegaard commented on August 30, 2024

from rsound.

pmatos avatar pmatos commented on August 30, 2024

FWIW - is it a Linux only problem? At least I can't see the problem on macOS. /Jens Axel

Yeah - it's interesting and confusing at the same time. I am not being able to reproduce it reliably when just doing the require line, but it sure fails reliably when required through rsound, so unfortunately this seems to be a tricky one to repro. I will add more information as I find out about it.

from rsound.

pmatos avatar pmatos commented on August 30, 2024

This is a hell of a bug...

If I start drracket and run (excerpt from util.rkt.

(require ;"rsound.rkt"
         (only-in math/base power-of-two?)
         )

It works! So I uncomment the first line.

(require "rsound.rkt"
         (only-in math/base power-of-two?)
         )

to get: Assertion #<procedure:negative?> failed on 0.0

From here on out. Simply requiring (only-in math/base... is enough to cause the assertion.

Assertion #<procedure:negative?> failed on 0.0
  context...:
   body of "/home/pmatos/installs/racket-8.3/share/pkgs/math-lib/math/private/flonum/flonum-constants.rkt"

However, requiring only rsound.rkt is not enough to cause the issue.

from rsound.

jbclements avatar jbclements commented on August 30, 2024

Well, rsound (or, more specifically, portaudio) does use ffi/unsafe, so there's a definite window open for this to be my fault. Ugh. I wish I could reproduce it! Also, it appears to me that for Ken Shan, at least, rsound does not show this bug. Also, I can't reproduce it on my vps. Oog.

from rsound.

pmatos avatar pmatos commented on August 30, 2024

from rsound.

jbclements avatar jbclements commented on August 30, 2024

from rsound.

pmatos avatar pmatos commented on August 30, 2024

Well, if I can see the bug, I’m certainly much more likely to try to narrow it down than if I don’t. I agree that if it depends on having alsa set up, it could be quite painful. Best, John

Sounds like finding a way to reproduce it might take as long and myself digging into the code and trying to fix it tbh. I tried in all pcs I have around and it only fails on my work PC. :(

This means that it is probably related to some alsa setup. At least I have something to go on... I will try to understand what's happening on the interface with the FFI and the warning messages I get on the console from ALSA lib.

Will keep you up-to-date.

from rsound.

Related Issues (20)

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.