[CM] snd: cannot set hardware parameters for default

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Tue, 22 Jan 2008 16:07:52 -0800


On Tue, 2008-01-22 at 14:53 -0800, Funny Zen wrote:
> I have installed both alsa and jack. do you suggest that I should
> uninstall alsa and use oss? Because other sources suggest to use alsa
> together with jack. But, I guess this is a really newbie's question,
> do I have to do anything everytime I want to use jack with a program
> like snd? I use fedora c7 with the planetccrma kernel, so I always
> thought that everything is configured since I use planetccrma. I did
> search in the web to find how to configure jack in fedora but got even
> more confused.
> 
> Does anybody have any idea about the clm problem? this is more
> important for me at the moment.
> 
> >I'm also trying to follow the clm tutorial, I'm using
> emacs/slime/sbcl. I compile >and load an instrument like "v.ins", but
> when trying to play fm-violin using >with-sound, although I do not
> have error messages, an empty (0kb) test.snd >file is created and I
> have no sound. Nobody knows why?

Hmmm, you could try this (after copying v.ins to the current directory):

  (compile-file "v.ins")
  (load "v")
;;; that should have loaded the instrument
  (with-sound(:play nil)(fm-violin 0 1 440 0.1))
;;; that should create a non-zero length test.snd file...
;;; but will not try to play it (:play nil)

This is what I get here:

-rw-r--r-- 1 nando wheel  44202 Jan 22 15:50 test.snd

Now, as to playing it, clm by default calls the program "sndplay" to try
to play the file and whether that works or not depends on how it was
built. As you have Planet CCRMA installed I'd recommend you install the
"snd-utils" package which includes a properly (I hope) built sndplay. 

I was just testing this and there _is_ something weird with the built-in
player that comes with clm-sbcl in Fedora (which I built). 

So, install "snd-utils" and do this:

  (setf *clm-player* "/usr/bin/sndplay")

That will force clm to use that particular program for playback, and not
the one included in the clm-sbcl package. 

If you start jack before, you should be able to play the resulting
soundfile. To start jack you can use qjackctl which is a nice front end
to jackd. Go to the Setup panel, select "hw:0" for the "Interface" (that
will use your first soundcard for sound i/o) and start the server...

-- Fernando



> "Kjetil S. Matheussen" <k.s.matheussen@notam02.no> wrote:
>         On Fri, 18 Jan 2008, Funny Zen wrote:
>         
>         > Hi there,
>         > 
>         > when trying to load and edit a soundfile in snd it works ok,
>         but when I 
>         > try to play the file I have an error "can't play: not valid
>         parameter: 
>         > cannot set hardware parameters for default". I do have audio
>         with other 
>         > applications.
>         > 
>         
>         I guess using a different sound API than alsa should solve
>         problems like 
>         that. OSS and/or jack should work fine.
>         
> 
> 
> 
> 
> ______________________________________________________________________
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
> it now.