On Mon, 7 Nov 2011 12:38:37 -0200 Gustavo Sverzut Barbieri <barbi...@profusion.mobi> said:
i didn't write it. it came that way. eina_log is also much less convenient as i have to set up a log domain id, create it, delete it, have all the init/shutdown infra then and then finally use longer function calls (or add more macros). it isn't conducive to being used. i understand your point - but the code came this way and i don't have a religious take on this so much that i will instantly refactor code to use eina log when i have other issues to chase down - like mixing issues that i was creating a simplified test case for today as well as cleaning the code up a bit. > Sorry, I know this is nitpicking but why don't you use it from start? It's > easier than printf() > > On Monday, November 7, 2011, Carsten Haitzler <ras...@rasterman.com> wrote: > > On Mon, 7 Nov 2011 09:37:09 -0200 Gustavo Sverzut Barbieri > > <barbi...@profusion.mobi> said: > > > > bigger fish to fry atm. > > > >> Please convert to proper eina log. I'd use one domain per backend, they > are > >> separated modules. > >> > >> On Monday, November 7, 2011, Enlightenment SVN < > no-re...@enlightenment.org> > >> wrote: > >> > Log: > >> > and some more cleaning/formatting in alsa code > >> > > >> > > >> > > >> > Author: raster > >> > Date: 2011-11-06 21:57:46 -0800 (Sun, 06 Nov 2011) > >> > New Revision: 64855 > >> > Trac: http://trac.enlightenment.org/e/changeset/64855 > >> > > >> > Modified: > >> > trunk/edje/src/modules/alsa_snd_player/alsa_snd_player.c > >> > > >> > Modified: trunk/edje/src/modules/alsa_snd_player/alsa_snd_player.c > >> > =================================================================== > >> > --- trunk/edje/src/modules/alsa_snd_player/alsa_snd_player.c > >> 2011-11-07 05:45:00 UTC (rev 64854) > >> > +++ trunk/edje/src/modules/alsa_snd_player/alsa_snd_player.c > >> 2011-11-07 05:57:46 UTC (rev 64855) > >> > @@ -43,72 +43,69 @@ > >> > > >> > if ((err = snd_pcm_open(&alsa_dev, device, SND_PCM_STREAM_PLAYBACK, > >> 0)) < 0) > >> > { > >> > + printf("cannot open alsa playback stream (%s)\n", > >> snd_strerror(err)); > >> > goto catch_error; > >> > } > >> > - > >> > if ((err = snd_pcm_hw_params_malloc(&hw_params)) < 0) > >> > { > >> > + printf("cannot alloc snd hw params (%s)\n", > snd_strerror(err)); > >> > goto catch_error; > >> > } > >> > - > >> > if ((err = snd_pcm_hw_params_any(alsa_dev, hw_params)) < 0) > >> > { > >> > - printf("cannot initialize hardware parameter structure > (%s)\n", > >> snd_strerror(err)); > >> > + printf("cannot initialize snd hw params (%s)\n", > >> snd_strerror(err)); > >> > goto catch_error; > >> > } > >> > - > >> > - if ((err = snd_pcm_hw_params_set_access(alsa_dev, hw_params, > >> SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) > >> > + if ((err = snd_pcm_hw_params_set_access(alsa_dev, hw_params, > >> > + > >> SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) > >> > { > >> > printf("cannot set access type (%s)\n", snd_strerror(err)); > >> > goto catch_error; > >> > } > >> > - > >> > - if ((err = snd_pcm_hw_params_set_format(alsa_dev, hw_params, > >> SND_PCM_FORMAT_FLOAT)) < 0) > >> > + if ((err = snd_pcm_hw_params_set_format(alsa_dev, hw_params, > >> > + SND_PCM_FORMAT_FLOAT)) < 0) > >> > { > >> > // FIXME: handle if float format not possible > >> > printf("cannot set sample format (%s)\n", snd_strerror(err)); > >> > goto catch_error; > >> > } > >> > - > >> > - if ((err = snd_pcm_hw_params_set_rate_near(alsa_dev, hw_params, > >> &samplerate, 0)) < 0) > >> > + if ((err = snd_pcm_hw_params_set_rate_near(alsa_dev, hw_params, > >> > + &samplerate, 0)) < 0) > >> > { > >> > // FIXME: get actual sample rate and tell remix > >> > printf("cannot set sample rate (%s)\n", snd_strerror(err)); > >> > goto catch_error; > >> > } > >> > - > >> > if ((err = snd_pcm_hw_params_set_channels(alsa_dev, hw_params, > >> channels)) > enlightenment-devel mailing list > >> enlightenment-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > >> > > > > > > -- > > ------------- Codito, ergo sum - "I code, therefore I am" -------------- > > The Rasterman (Carsten Haitzler) ras...@rasterman.com > > > > > > -- > Gustavo Sverzut Barbieri > http://profusion.mobi embedded systems > -------------------------------------- > MSN: barbi...@gmail.com > Skype: gsbarbieri > Mobile: +55 (19) 9225-2202 -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel