-
Notifications
You must be signed in to change notification settings - Fork 18
No sound when running test.rs example #17
Comments
Hmmm, definitely an issue (you should hear a sine wave sweeping downward for about 3 seconds) - it's running fine on macos for me, however this isn't the first time a linux user has reported buffer under/overflow issues! Do the rust-portaudio examples work for you? When you run them, it should pass the input straight to the output (so you should be able to hear mic input coming from your speakers). I would be interested to hear how both the non-blocking and blocking examples run - I have a feeling our problem might be in the rust-portaudio crate (perhaps we still have to implement some system-specific stuff for ALSA / Jack). Btw, does changing the So sorry you've been running into issues with the RustAudio crates! I really appreciate you sharing these issues, and I'm really keen to see what we can do to fix them! PS: Actually come to think of it, I should also mention that when I first run rust-portaudio's If this is the case, I think we could fix it by changing SoundStream to return an |
Changing the channels did not help. I just ran the examples from I pasted the output to this gist. |
@niclashoyer I think this might have been a fix - let me know how |
With the changes in portaudio#76 and sound_stream# the test finally runs on my laptop using ALSA. Using the debug build I get a lot of underruns and very distorted sound. Running with |
Unfortunately these samples aren't working for me (it just takes me to a privacy error page) - any chance try a different host? or you could email them to me - mitchell dot nordine at gmail dot com. (Would be nice to have them on this issue for reference though). I should really add a simple 440hz sine wave example too so it's easier to test. Maybe you're up for adding this? I'll add an issue. I'm not sure what could be causing the consistent underruns - might have to do some reading on the difference between the way portaudio handles streams between OSs. It might even be a difference between drivers as well. Anyway, you mentioned that the non-blocking example works fine yes? I might add non-blocking support to SoundStream tonight so at least users have something usable to work with (it's also probably a more attractive option than a blocking stream in most cases anyway). |
facepalm I think I figured out the issue with the blocking example. We should have been using the number of frames returned by |
great! I'll test asap. Nevertheless I sent you the samples by email. I searched for something like gist or pastebin, but for sound files. I tried soundcloud, but they needed flash, so I thought why not upload it to my server. I forgot that my certificate is still self signed, sorry about that. |
As portaudio#78 fixed the blocking example for me on ALSA, does the sound_stream crate also need to handle async duplex streams differently? Because the examples are still failing for me with underruns. |
i haven't yet updated SoundStream (the iterator method needs a pretty thorough re-write), should be done within an hour two though :) |
I just tried the example
test.rs
, but it seems that immediately after printingnote_on
it exits. Some debug logging reveals thataudio_requested
is called exactly two times and after that the process exits with a buffer underrun. The synth is active and the output buffer inaudio_requested
is filled with values (different from zero). Any suggestions for debugging?Example output:
The text was updated successfully, but these errors were encountered: