• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CAAudiofile.h in CoreAudio Public Utility and other things
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CAAudiofile.h in CoreAudio Public Utility and other things


  • Subject: CAAudiofile.h in CoreAudio Public Utility and other things
  • From: "Roni Music" <email@hidden>
  • Date: Fri, 7 Apr 2006 10:59:40 +0200


Hi,

I'm using a lot of all the useful stuff in CoreAudio Public Utility. It's great!

I recently had to change from using the 10.4u SDK to 10.3.9 SDK for reason I will not explain now.

This makes the following part fail to compile (I want to avoid making changes myself in the CoreAudio Public Utility files if possible):


from CAAudiofile.h:


#ifndef MAC_OS_X_VERSION_10_4
// we have pre-Tiger headers; add our own declarations
typedef UInt32 AudioFileTypeID;
enum {
kExtAudioFileError_InvalidProperty = -66561,
kExtAudioFileError_InvalidPropertySize = -66562,
kExtAudioFileError_NonPCMClientFormat = -66563,
kExtAudioFileError_InvalidChannelMap = -66564, // number of channels doesn't match format
kExtAudioFileError_InvalidOperationOrder = -66565,
kExtAudioFileError_InvalidDataFormat = -66566,
kExtAudioFileError_MaxPacketSizeUnknown = -66567,
kExtAudioFileError_InvalidSeek = -66568, // writing, or offset out of bounds
kExtAudioFileError_AsyncWriteTooLarge = -66569,
kExtAudioFileError_AsyncWriteBufferOverflow = -66570 // an async write could not be completed in time
};
#else
#if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
#include <AudioToolbox/ExtendedAudioFile.h>
#else
#include "ExtendedAudioFile.h"
#endif
#endif



-------------------------

the AvailabilityMacros.h file (regardless if it's from SDK 10.2.8, 10.3.9 or 10.4u) has the following #defines

#define MAC_OS_X_VERSION_10_0 1000
#define MAC_OS_X_VERSION_10_1 1010
#define MAC_OS_X_VERSION_10_2 1020
#define MAC_OS_X_VERSION_10_3 1030
#define MAC_OS_X_VERSION_10_4 1040

so even when I use SDK 10.3.9 it will try to include ExtendedAudioFile.h which is not available until Tiger

wouldn't
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
be better?
Or something that makes it compile regardless what SDK we use?

-----------

Also some classes in files such as for example CAAudioHardwareDevice.h and CAAudioHardwareDevice.cpp
has some newer member functions that relies on things introduced in Tiger, for example:


bool CAAudioHardwareDevice::GetSoloControlValue(UInt32 inChannel, CAAudioHardwareDeviceSectionID inSection) const
{
UInt32 theValue = 0;
UInt32 theSize = sizeof(UInt32);
GetPropertyData(inChannel, inSection, kAudioDevicePropertySolo, theSize, &theValue);
return theValue != 0;
}



kAudioDevicePropertySolo is not available when using SDK 10.3.9 or earlier which again makes it difficult to use other SDK's than 10.4


it would be good if those newer additions were wrapped in something as:

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
bool CAAudioHardwareDevice::GetSoloControlValue(UInt32 inChannel, CAAudioHardwareDeviceSectionID inSection) const
{
UInt32 theValue = 0;
UInt32 theSize = sizeof(UInt32);
GetPropertyData(inChannel, inSection, kAudioDevicePropertySolo, theSize, &theValue);
return theValue != 0;
}
#endif




Any comments?

Rolf
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: why does the MovieAudioExtraction API require a "sample rollback?"
  • Next by Date: Re: CAAudiofile.h in CoreAudio Public Utility and other things
  • Previous by thread: Re: why does the MovieAudioExtraction API require a "sample rollback?"
  • Next by thread: Re: CAAudiofile.h in CoreAudio Public Utility and other things
  • Index(es):
    • Date
    • Thread