[racket] RSound in ubuntu only works with diagnose-sound-playing - can't choose library?
Ah. Plays just fine.
-Ian
----- Original Message -----
From: "John Clements" <clements at brinckerhoff.org>
To: "J. Ian Johnson" <ianj at ccs.neu.edu>
Cc: "users" <users at racket-lang.org>
Sent: Thursday, May 16, 2013 4:55:28 PM GMT -05:00 US/Canada Eastern
Subject: Re: [racket] RSound in ubuntu only works with diagnose-sound-playing - can't choose library?
On May 16, 2013, at 12:43 PM, J. Ian Johnson wrote:
> I get that aplay is undefined. I'm just doing a (require (planet clements/rsound)). Actually, here it is in its entirety. The rsound use is in "notice."
>
> https://gist.github.com/ianj/5594474
Sorry… I wasn't clear. 'aplay' is a separate stand-alone application:
http://linux.die.net/man/1/aplay
I just wanted to see how ALSA was behaving on your system.
John
>
> -Ian
> ----- Original Message -----
> From: "John Clements" <clements at brinckerhoff.org>
> To: "J. Ian Johnson" <ianj at ccs.neu.edu>
> Cc: "users" <users at racket-lang.org>
> Sent: Thursday, May 16, 2013 3:01:28 PM GMT -05:00 US/Canada Eastern
> Subject: Re: [racket] RSound in ubuntu only works with diagnose-sound-playing - can't choose library?
>
>
> On May 16, 2013, at 11:27 AM, J. Ian Johnson wrote:
>
>> It was 44.1K, but now that I try to reproduce it today (previously had headphones plugged in), it plays no sound at all.
>> I noticed that diagnose-sound-playing does not restore host-api to what it was before the call.
>
> Grr… Mac OS X has 99 problems, but reliable sound-playing ain't one.
>
> I'm not entirely surprised to hear this, although I'm more familiar with the problem on Windows.
>
> Per your suggestion, I've changed the parameter mutation to a parameterize… not that that would affect your problem at all.
>
> For reference, can you play a sound with 'aplay' (iirc, that's the built-in ALSA player) ?
>
> If you're looking for a sound, you might choose rsound's ./contrib/drum-samples/crash-cymbal.wav .
>
> Thanks again for your help with what I'm sure was just supposed to be a 30-second project.
>
> John
>
>
>
>> -Ian
>> ----- Original Message -----
>> From: "John Clements" <clements at brinckerhoff.org>
>> To: "J. Ian Johnson" <ianj at ccs.neu.edu>
>> Cc: "users" <users at racket-lang.org>
>> Sent: Thursday, May 16, 2013 2:18:48 PM GMT -05:00 US/Canada Eastern
>> Subject: Re: [racket] RSound in ubuntu only works with diagnose-sound-playing - can't choose library?
>>
>>
>> On May 15, 2013, at 5:18 PM, J. Ian Johnson wrote:
>>
>>> Mostly towards John Clements:
>>>
>>> I thought I'd take a look at RSound to make a little "do X for 30 seconds *beep* wait 10 seconds *beep* [repeat]" program. Trying (play ding) gets me the stuff before the "found 2 host APIs" with no sound. Running diagnose-sound-playing gets me a beep after the "trying api paALSA" but nothing afterwards. There isn't any documentation for setting the API to just use paALSA, so... what might be going on here? I'm running xfce 4.10 - xubuntu 12.10 64 bit.
>>
>> You're right, there's an undocumented function for setting the api, and also for querying the set of all available APIs.
>>
>> I've added documentation for that, but not pushed it yet.
>>
>> In the meantime, you can choose the host API explicitly, using
>>
>> (host-api 'paALSA)
>>
>> I don't personally expect this to solve your problem, given what you've said, but I'm curious: did the beep you heard occur when trying to play at 44.1K, or at 48K?
>>
>> Thanks for your help!
>>
>> John
>>
>>>
>>> I have all the pulseaudio modules that aptitude listed.
>>>
>>> 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
>>> Cannot connect to server socket err = No such file or directory
>>> Cannot connect to server request channel
>>> jack server is not running or cannot be started
>>> Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
>>> found 2 host API(s): (paALSA paOSS)
>>> trying each one in turn.
>>> trying api paALSA:
>>> trying to play at sample rate 44100.0:
>>> ...finished.
>>> trying to play at sample rate 48000.0:
>>> Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1670
>>> Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1830
>>> Expression 'PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2096
>>> Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2764
>>> playing sound failed with message: "pa-open-stream: Device unavailable"
>>> trying api paOSS:
>>> trying to play at sample rate 44100.0:
>>> playing sound failed with message: "stream-choose: no devices available in current API paOSS with 100.0ms latency or less."
>>> trying to play at sample rate 48000.0:
>>> playing sound failed with message: "stream-choose: no devices available in current API paOSS with 100.0ms latency or less."
>>> If playback at 44100.0 failed and playback at another sample rate
>>> succeeded using Windows 7, you probably need to manually set the
>>> sample rate of that playback device to 44100 Hz, by right-clicking
>>> on the volume icon and then digging through menus (properties, advanced).
>>>
>>> -Ian
>>> ____________________
>>> Racket Users list:
>>> http://lists.racket-lang.org/users
>>
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users