This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct AQPlayerState { | |
AudioStreamBasicDescription mDataFormat; // 2 | |
AudioQueueRef mQueue; // 3 | |
AudioQueueBufferRef mBuffers[kNumberBuffers]; // 4 | |
SInt64 mCurrentPacket; // 7 | |
UInt32 mNumPacketsToRead; // 8 | |
AudioStreamPacketDescription *mPacketDescs; // 9 | |
DAGAudioSinkNode *audioSink; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The output at time 0 is the sum of the | |
// previous num_taps samples times the taps | |
int j; | |
for(j = 0; j < num_taps; j++) { | |
float2 sample = 0; | |
int sample_index = i - (num_taps - 1); | |
if (sample_index < 0) { | |
sample = lastBlock[2048+sample_index]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compute the needed adjustment in x and y to align our lines for crisp, exact pixel coverage. (We can only do this if the lineWidth is integral, which it usually is.) | |
CGFloat adjustment = 0.0; | |
CGFloat lineWidth = [[self enclosingTreeView] connectingLineWidth]; | |
NSSize lineSize = NSMakeSize(lineWidth, lineWidth); | |
NSSize lineSizeInPixels = [self convertSizeToBase:lineSize]; | |
CGFloat halfLineWidthInPixels = 0.5 * lineSizeInPixels.width; | |
if (fabs(halfLineWidthInPixels - floor(halfLineWidthInPixels)) > 0.0001) { | |
// If line width in pixels is odd, lay our path segments along the centers of pixel rows. | |
NSSize adjustmentAsSizeInPixels = NSMakeSize(0.5, 0.5); | |
NSSize adjustmentAsSize = [self convertSizeFromBase:adjustmentAsSizeInPixels]; |
NewerOlder