Search
lxdream.org :: lxdream :: r75:58ff379f11df
lxdream 0.9.1
released Jun 29
Download Now
changeset75:58ff379f11df
parent74:771ee2b1e4f8
child76:e9a0bd313036
authornkeynes
dateThu Jan 12 22:59:48 2006 +0000 (14 years ago)
Fix nanos => samples conversion
src/aica/aica.c
1.1 --- a/src/aica/aica.c Thu Jan 12 12:38:59 2006 +0000
1.2 +++ b/src/aica/aica.c Thu Jan 12 22:59:48 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: aica.c,v 1.12 2006-01-12 11:30:19 nkeynes Exp $
1.6 + * $Id: aica.c,v 1.13 2006-01-12 22:59:48 nkeynes Exp $
1.7 *
1.8 * This is the core sound system (ie the bit which does the actual work)
1.9 *
1.10 @@ -79,7 +79,7 @@
1.11 /* Run arm instructions */
1.12 int reset = MMIO_READ( AICA2, AICA_RESET );
1.13 if( (reset & 1) == 0 ) { /* Running */
1.14 - int num_samples = (nanosecs_done + nanosecs) / AICA_SAMPLE_RATE - samples_done;
1.15 + int num_samples = (int)((uint64_t)AICA_SAMPLE_RATE * (nanosecs_done + nanosecs) / 1000000000);
1.16 num_samples = arm_run_slice( num_samples );
1.17 audio_mix_samples( num_samples );
1.18
.