Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: "Audio Queue Service Programming Guide"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Audio Queue Service Programming Guide"



I suspect "static const int" is not a compile time constant outside of C++. Try making kNumberBuffers an enum or #define instead.

In any case please file a bug at bugreporter.apple.com

# sent from my iPhone

On Aug 28, 2010, at 17:48, GW Rodriguez <email@hidden> wrote:

Ok, after a cool down period from my rant and re-reading and trying to troubleshoot I've found the root of the problem.  Its in the created struct that manages the state of the audio file.  eg:

static const int kNumberBuffers = 3;

struct AQPlayerState {
    AudioStreamBasicDescription      mDataFormat;                    
    AudioQueueRef                          mQueue;                         
    AudioQueueBufferRef                 mBuffers[kNumberBuffers];       
    AudioFileID                                mAudioFile;                     
    UInt32                                       bufferByteSize;                 
    SInt64                                       mCurrentPacket;                 
    UInt32                                       mNumPacketsToRead;              
    AudioStreamPacketDescription   *mPacketDescs;                  
    bool                                          mIsRunning;                     
};



When I first typed in this code and hit build, I had no errors.  After just hitting build a few times, without changing, adding or subtracting any code, I get an error "variably modified 'mBuffers at file scope". 

Help????



--
GW Rodriguez
Sound Supervisor
Olney Theatre Center
(c) 909-720-4202
www.gwrodriguez.com
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
References: 
 >RE: "Audio Queue Service Programming Guide" (From: GW Rodriguez <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.