[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-audio-cvs
Subject:    [Audio-cvs] device/platform/unix audAndroid.cpp,1.7,1.8
From:       sfu () helixcommunity ! org
Date:       2011-05-12 12:13:53
Message-ID: 201105121213.p4CCDRus018231 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/audio/device/platform/unix
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv9481

Modified Files:
	audAndroid.cpp 
Log Message:
merge number of channels check fix from atlas310 branch

Index: audAndroid.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/unix/audAndroid.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- audAndroid.cpp	3 Dec 2010 03:22:55 -0000	1.7
+++ audAndroid.cpp	12 May 2011 12:13:51 -0000	1.8
@@ -432,13 +432,18 @@
     if (pFormat->uBitsPerSample != 16)
     {
         //Not quite the real error, but it is what we need to return.
-        retCode = RA_AOE_DEVBUSY;
+        retCode = RA_AOE_BADFORMAT;
         goto donechecking;
     }
 
     //TODO: check sample rate
     
-    //TODO: check num channels
+    //Check number of channels. Android so far only support stereo/mono
+    if (pFormat->uChannels > 2)
+    {
+        retCode = RA_AOE_BADFORMAT;
+        goto donechecking;
+    }
  
     //Close the audio device.
   donechecking:


_______________________________________________
Audio-cvs mailing list
Audio-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/audio-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic