Commit cad15897 authored by sletz's avatar sletz
Browse files

Mario Lang alsa_io time calculation overflow patch.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3858 0c269be4-1314-0410-8aa9-9f06e86f4224
parent f1ccdba0
......@@ -21,12 +21,16 @@ Torben Hohn
Paul Davis
Peter L Jones
Devin Anderson
Josh Green
Josh Green
Mario Lang
---------------------------
Jackdmp changes log
---------------------------
2009-12-13 Stephane Letz <letz@grame.fr>
* Mario Lang alsa_io time calculation overflow patch.
2009-12-10 Stephane Letz <letz@grame.fr>
......
......@@ -184,7 +184,7 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_
}
/* set the buffer time */
buffer_time = 1000000*period*nperiods/rate;
buffer_time = 1000000*(uint64_t)period*nperiods/rate;
err = snd_pcm_hw_params_set_buffer_time_near(handle, params, &buffer_time, &dir);
if (err < 0) {
printf("Unable to set buffer time %i for playback: %s\n", 1000000*period*nperiods/rate, snd_strerror(err));
......@@ -199,7 +199,7 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_
printf( "WARNING: buffer size does not match: (requested %d, got %d)\n", nperiods * period, (int) real_buffer_size );
}
/* set the period time */
period_time = 1000000*period/rate;
period_time = 1000000*(uint64_t)period/rate;
err = snd_pcm_hw_params_set_period_time_near(handle, params, &period_time, &dir);
if (err < 0) {
printf("Unable to set period time %i for playback: %s\n", 1000000*period/rate, snd_strerror(err));
......
......@@ -183,7 +183,7 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_
}
/* set the buffer time */
buffer_time = 1000000*period*nperiods/rate;
buffer_time = 1000000*(uint64_t)period*nperiods/rate;
err = snd_pcm_hw_params_set_buffer_time_near(handle, params, &buffer_time, &dir);
if (err < 0) {
printf("Unable to set buffer time %i for playback: %s\n", 1000000*period*nperiods/rate, snd_strerror(err));
......@@ -198,7 +198,7 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_
printf( "WARNING: buffer size does not match: (requested %d, got %d)\n", nperiods * period, (int) real_buffer_size );
}
/* set the period time */
period_time = 1000000*period/rate;
period_time = 1000000*(uint64_t)period/rate;
err = snd_pcm_hw_params_set_period_time_near(handle, params, &period_time, &dir);
if (err < 0) {
printf("Unable to set period time %i for playback: %s\n", 1000000*period/rate, snd_strerror(err));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment