changeset 1269:4b22da2a309f

Comments, cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 03 Jun 2015 16:17:04 +0300
parents 6fc71b410cc3
children 7f20f611c241
files minijss/jssmix.c minijss/jssmix.h
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/minijss/jssmix.c	Mon Jun 01 03:34:16 2015 +0300
+++ b/minijss/jssmix.c	Wed Jun 03 16:17:04 2015 +0300
@@ -102,7 +102,7 @@
         "Invalid number of channels %d\n", outChannels);
     }
 
-    if (outFreq < 4000)
+    if (outFreq < 1000)
     {
         JSSERROR(DMERR_INVALID_ARGS, NULL,
         "Invalid mixing frequency %d\n", outFreq);
@@ -147,8 +147,8 @@
     mixer->mutex = dmCreateMutex();
 #endif
     mixer->outFormat = outFormat;
+    mixer->outChannels = outChannels;
     mixer->outFreq = outFreq;
-    mixer->outChannels = outChannels;
 
     mixer->jvmMixChannel_FW = jvmMixRoutines[mixerIdx].jvmMixChannel_FW;
     mixer->jvmMixChannel_BW = jvmMixRoutines[mixerIdx].jvmMixChannel_BW;
--- a/minijss/jssmix.h	Mon Jun 01 03:34:16 2015 +0300
+++ b/minijss/jssmix.h	Wed Jun 03 16:17:04 2015 +0300
@@ -42,7 +42,7 @@
     int     chVolumeD,
             chPanningD;
 
-    int     chFreq;         // Frequency of sampel in Hz
+    int     chFreq;         // Frequency of sample in Hz
 
     void    *chData;        // Pointer to data
 
@@ -65,10 +65,11 @@
 
 struct _JSSMixer
 {
-    int             outFormat,
-                    outChannels,
-                    outFreq,
+    int             outFormat,     // Output format (see JSS_AUDIO_* in jss.h)
+                    outChannels,   // Number of output channels
+                    outFreq,       // Real output frequency
                     globalVol;
+
     JSSChannel      channels[jsetNChannels];
 
     int             addBufSize;