Warning: Can't synchronize with the repository (Couldn't open Subversion repository /home/crystal/scm/crystal: SubversionException: ("Expected FS format between '1' and '3'; found format '4'", 160043)). Look in the Trac log for more information.

Ticket #811 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

driver_coreaudio.cpp fails to compile on Mac OS X 10.6

Reported by: eduardop Owned by: sunshine
Priority: major Milestone:
Component: sound Version: V1.9
Keywords: Cc:

Description (last modified by sunshine) (diff)

In OS X 10.6 the compiler errors out complaining that it cannot convert size_t* to UInt32* on parameter 4 of the function below. The fix shown below makes it work.

-    stat = AudioConverterConvertBuffer(converter, framesFilled * playback_format.Bits/8 * playback_format.Channels, convert_buffer, &bytesWritten, outOutputData->mBuffers[0].mData); 
+    stat = AudioConverterConvertBuffer(converter, framesFilled * playback_format.Bits/8 * playback_format.Channels, convert_buffer, (UInt32*)&bytesWritten, outOutputData->mBuffers[0].mData); 

Change History

Changed 4 years ago by eduardop

Sorry, bad formatting, trying with the suggested triple braces:

-    stat = AudioConverterConvertBuffer(converter, framesFilled * playback_format.Bits/8 * playback_format.Channels, convert_buffer, &bytesWritten, outOutputData->mBuffers[0].mData); 
+    stat = AudioConverterConvertBuffer(converter, framesFilled * playback_format.Bits/8 * playback_format.Channels, convert_buffer, (UInt32*)&bytesWritten, outOutputData->mBuffers[0].mData);

Changed 4 years ago by sunshine

  • description modified (diff)

Changed 4 years ago by sunshine

A good way to format diffs within the ticket description and comments is by encapsulating it like this:

{{{
#!diff
...place diff here...
}}}

Also, diffs are most useful and can be applied automatically when they include full context, such as the result of 'diff -u' or 'svn diff'.

Changed 4 years ago by sunshine

  • owner changed from rhad to sunshine
  • status changed from new to accepted

Changed 4 years ago by sunshine

  • status changed from accepted to closed
  • resolution set to fixed

Fixed in r33872.
Merged into 1.4 with r33873.

Note that the proper fix was to declare bytesWritten as the correct data type (UInt32) rather than casting the pointer upon function invocation.

Note: See TracTickets for help on using tickets.