Remarks about alsa-lib-1.0.29/test/pcm*.c
Hello,
I'm looking about examples in alsa-lib-1.0.29/test/
I have two questions about:
pcm.c line 71: In case of a FLOAT format, maxval is 1.0, isn't it?
pcm_min.c lin 79: Variable err does not refers to the previous call?
Did I understood well?
Best regards
Christophe
test/pcm.c +1 -1
@@ -68,7 +68,7 @@ static void generate_sine(const snd_pcm_ } fval;int res, i;if (is_float) { - fval.f =sin (phase) * maxval; + fval.f =sin (phase); res = fval.i; }else res =sin (phase) * maxval;
test/pcm_min.c +1 -1
@@ -39,7 +39,7 @@ int main(void)if (frames <0 ) frames =snd_pcm_recover (handle, frames,0 );if (frames <0 ) { -printf ("snd_pcm_writei failed: %s\n" ,snd_strerror (err)); +printf ("snd_pcm_writei failed: %s\n" ,snd_strerror (frames));break ; }if (frames >0 && frames < (long )sizeof (buffer))
At Sun, 31 May 2015 13:51:26 +0200,
Quoted 11 lines · Christophe Lohr
Hello,
I'm looking about examples in alsa-lib-1.0.29/test/I have two questions about:
pcm.cline 71: In case of a FLOAT format, maxval is 1.0, isn't it?
pcm_min.clin 79: Variable err does not refers to the previous call?Did I understood well?
Yes, both are correct fixes. Now I merged to git tree. Thanks!
Takashi
Quoted 31 lines
Best regards
Christophe
diff -uprNalsa-lib-1.0.29.origin/test/pcm.calsa-lib-1.0.29/test/pcm.ctest/pcm.c +1
-1@@ -68,7 +68,7 @@ static void generate_sine(const snd_pcm_ } fval;int res, i;if (is_float) { - fval.f =sin (phase) * maxval; + fval.f =sin (phase); res = fval.i; }else res =sin (phase) * maxval;diff -uprN
alsa-lib-1.0.29.origin/test/pcm_min.calsa-lib-1.0.29/test/pcm_min.ctest/pcm_min.c +1
-1@@ -39,7 +39,7 @@ int main(void)if (frames <0 ) frames =snd_pcm_recover (handle, frames,0 );if (frames <0 ) { -printf ("snd_pcm_writei failed: %s\n" ,snd_strerror (err)); +printf ("snd_pcm_writei failed: %s\n" ,snd_strerror (frames));break ; }if (frames >0 && frames < (long )sizeof (buffer))_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel