[MacPorts] #26446: openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to 'int32_t*'

MacPorts noreply at macports.org
Thu Aug 8 21:30:12 PDT 2013


#26446: openal 1.3 on Tiger: invalid conversion from 'volatile int32_t*' to
'int32_t*'
---------------------------+--------------------------------
  Reporter:  ryandesign@…  |      Owner:  macports-tickets@…
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  1.9.1
Resolution:                |   Keywords:  tiger
      Port:  openal        |
---------------------------+--------------------------------

Comment (by blair@…):

 Sad to see this has been hanging in limbo since 2010, but I fixed this on
 my G5 Tiger system with a few small edits to the .cpp and .h files!
 Unfortunately after a successful build, it wiped out the sources in the
 work directory.  Drat, I was excited to make some .diff files for you.
 Here's roughly what I did:

 Anywhere it said "invalid conversion from volatile int32_t* to int32_t*",
 I cast the parameter as int32_t*, like so:
 {{{
 OSAtomicIncrement32Barrier( (int32_t*) whateverTheArgWas );
 }}}

 The 10.5+ version of CoreAudioType.h defines
 kAudioChannelLayoutTag_AudioUnit_7_0_Front, but the 10.4 version doesn't.
 So I added it to the top of oalDevice.cpp:
 {{{
 #define kAudioChannelLayoutTag_AudioUnit_7_0_Front ((148L<<16) | 7)
 }}}

 Apparently the CAMutex class is included from /Developer/Examples, with a
 different set of features depending on your OSX/Xcode version.  Yikes,
 what a mess.  Instead of using CAMutex::Tryer (which doesn't exist in the
 Xcode2 version), I popped
 [http://developer.apple.com/library/mac/samplecode/CoreAudioUtilityClasses/Listings/CoreAudio_PublicUtility_CAMutex_h.html
 the relevant code] straight into oalContext.cpp:
 {{{
 //CAMutex::Tryer tryer(mSourceMapLock); // REMOVED

 //if (tryer.HasLock()) // REMOVED

 bool mNeedsRelease = false; // ADDED
 if( mSourceMapLock.Try(mNeedsRelease) ) // ADDED
 {
     newSource = mSourceMap->Get(inSourceToken); // UNCHANGED

     if (newSource) // UNCHANGED
         newSource->SetInUseFlag(); // UNCHANGED
 }
 if( mNeedsRelease ) // ADDED
     mSourceMapLock.Unlock(); // ADDED

 // ... and do it again for mDeadSourceMapLock
 }}}

 After all that, I was able to build it on my G5 with the +universal
 option.  Woohoo!

-- 
Ticket URL: <https://trac.macports.org/ticket/26446#comment:4>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list