Jouer un son (OpenAL du sample oalTouch) ne marche pas sur Firmware 3.0

apocaalypsoapocaalypso Membre
avril 2009 modifié dans API UIKit #1
Bonjour,

Grâce au sample oalTouch, j'ai réussi à  jouer du son pour mon application.
Le problème c'est qu'il ne marche pas sur iPhone Simulator avec le firmware 3.0 : mon application crash avec le message mach_msg_trap, voici le message de la console :
[Session started at 2009-04-11 21:37:16 +0200.]<br /><br />[Session started at 2009-04-11 21:37:19 +0200.]<br />Loading program into debugger...<br />GNU gdb 6.3.50-20050815 (Apple version gdb-965) (Mon Feb 16 20:24:53 UTC 2009)<br />Copyright 2004 Free Software Foundation, Inc.<br />GDB is free software, covered by the GNU General Public License, and you are<br />welcome to change it and/or distribute copies of it under certain conditions.<br />Type &quot;show copying&quot; to see the conditions.<br />There is absolutely no warranty for GDB.&nbsp; Type &quot;show warranty&quot; for details.<br />This GDB was configured as &quot;i386-apple-darwin&quot;.warning: Unable to read symbols for &quot;/System/Library/Frameworks/UIKit.framework/UIKit&quot; (file not found).<br />warning: Unable to read symbols from &quot;UIKit&quot; (not yet mapped into memory).<br />warning: Unable to read symbols for &quot;/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics&quot; (file not found).<br />warning: Unable to read symbols from &quot;CoreGraphics&quot; (not yet mapped into memory).<br />warning: Unable to read symbols for &quot;/System/Library/Frameworks/OpenGLES.framework/OpenGLES&quot; (file not found).<br />warning: Unable to read symbols from &quot;OpenGLES&quot; (not yet mapped into memory).<br />Program loaded.<br />sharedlibrary apply-load-rules all<br />Attaching to program: `/Users/account/Library/Application Support/iPhone Simulator/User/Applications/CF00C956-1538-458C-B6AF-F7BDA41971E0/Application.app/Application&#39;, process 5845.<br />[Switching to process 5845 thread 0x4903]<br />kill<br />error while killing target (killing anyway): warning: error on line 1987 of &quot;/SourceCache/gdb/gdb-965/src/gdb/macosx/macosx-nat-inferior.c&quot; in function &quot;macosx_kill_inferior_safe&quot;: (os/kern) failure (0x5x)<br />quit<br /><br />The Debugger has exited with status 0.(gdb)


Sous le firmware 2.2.1, l'app s'ouvre correctement mais ne joue pas le son.
Je pense avoir réussi à  isoler d'où vient l'erreur, elle viendrait du fichier "MyOpenALSupport.c" et vérifie le if de l'erreur suivant :
theOutputFormat.mSampleRate = theFileFormat.mSampleRate;<br />	theOutputFormat.mChannelsPerFrame = theFileFormat.mChannelsPerFrame;<br /><br />	theOutputFormat.mFormatID = kAudioFormatLinearPCM;<br />	theOutputFormat.mBytesPerPacket = 2 * theOutputFormat.mChannelsPerFrame;<br />	theOutputFormat.mFramesPerPacket = 1;<br />	theOutputFormat.mBytesPerFrame = 2 * theOutputFormat.mChannelsPerFrame;<br />	theOutputFormat.mBitsPerChannel = 16;<br />	theOutputFormat.mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger;<br />	<br />	// Set the desired client (output) data format<br />	err = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(theOutputFormat), &amp;theOutputFormat);<br />	if(err) { printf(&quot;MyGetOpenALAudioData: ExtAudioFileSetProperty(kExtAudioFileProperty_ClientDataFormat) FAILED, Error = %ld&#092;n&quot;, err); goto Exit; }<br />


J'ai tout revu en erreur y compris mon .xib et ses connections mais je n'ai pas pu trouver d'où cette erreur viendrais.

Quelqu'un pourrait-il m'éclairer ?

Merci !

Réponses

  • AliGatorAliGator Membre, Modérateur
    13:49 modifié #2
    Pour ton crash en SDK 3.0 je sais pas, mais pour le fait que le simulateur ne joue pas le son, il me semble si je dis pas de bétises que c'est normal : je crois que les sons ne se jouent que sur le device, quand tu es sur un vrai iPhone/iPod Touch mais pas dans le simulateur?
  • zoczoc Membre
    13:49 modifié #3
    dans 1239478957:

    Le problème c'est qu'il ne marche pas sur iPhone Simulator avec le firmware 3.0


    Tu n'as légalement pas le droit de parler de cela sur un forum public, à  cause du NDA. Et on n'a pas le droit de te répondre, pour les mêmes raisons.  >:)

    Par contre, sur les forums développeur d'Apple dédiés au firmware 3.0 c'est possible.


  • apocaalypsoapocaalypso Membre
    13:49 modifié #4
    D'accord, j'ai trouvé la solution, apparemment ça venait du nom du fichier.
    Merci !
Connectez-vous ou Inscrivez-vous pour répondre.