parent
86a870d0d1
commit
bbf87829ec
|
|
@ -239,12 +239,9 @@ typedef void(^STKFrameFilter)(UInt32 channelsPerFrame, UInt32 bytesPerFrame, UIn
|
|||
/// Disposes the STKAudioPlayer and frees up all resources before returning
|
||||
-(void) dispose;
|
||||
|
||||
/// Sets playback speed
|
||||
//
|
||||
-(void)setPlaybackSpeed:(double)speed;
|
||||
|
||||
/// Sets playback speed to 1.0
|
||||
-(void)setDefaultPlaybackSpeed;
|
||||
|
||||
/// The QueueItemId of the currently playing item
|
||||
-(NSObject*) currentlyPlayingQueueItemId;
|
||||
|
||||
|
|
|
|||
|
|
@ -343,8 +343,7 @@ static void AudioFileStreamPacketsProc(void* clientData, UInt32 numberBytes, UIn
|
|||
.componentManufacturer = kAudioUnitManufacturer_Apple
|
||||
};
|
||||
|
||||
playbackSpeedUnitDescription = (AudioComponentDescription)
|
||||
{
|
||||
playbackSpeedUnitDescription = (AudioComponentDescription) {
|
||||
.componentType = kAudioUnitType_FormatConverter,
|
||||
.componentSubType = kAudioUnitSubType_AUiPodTimeOther,
|
||||
.componentFlags = 0,
|
||||
|
|
@ -1878,16 +1877,10 @@ static void AudioFileStreamPacketsProc(void* clientData, UInt32 numberBytes, UIn
|
|||
[self stopThread];
|
||||
}
|
||||
|
||||
-(void)setPlaybackSpeed:(double)speed
|
||||
{
|
||||
- (void)setPlaybackSpeed:(double)speed {
|
||||
AudioUnitSetParameter(playbackSpeedUnit, kNewTimePitchParam_Rate, kAudioUnitScope_Global, 0, speed, 0);
|
||||
}
|
||||
|
||||
-(void)setDefaultPlaybackSpeed
|
||||
{
|
||||
[self setPlaybackSpeed:1.f];
|
||||
}
|
||||
|
||||
-(NSObject*) currentlyPlayingQueueItemId
|
||||
{
|
||||
OSSpinLockLock(¤tEntryReferencesLock);
|
||||
|
|
@ -2148,8 +2141,7 @@ static BOOL GetHardwareCodecClassDesc(UInt32 formatId, AudioClassDescription* cl
|
|||
CHECK_STATUS_AND_RETURN(AudioUnitSetProperty(outputUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, kOutputBus, &canonicalAudioStreamBasicDescription, sizeof(canonicalAudioStreamBasicDescription)));
|
||||
}
|
||||
|
||||
-(void) createPlaybackSpeedUnit
|
||||
{
|
||||
- (void)createPlaybackSpeedUnit {
|
||||
OSStatus status;
|
||||
|
||||
CHECK_STATUS_AND_RETURN(AUGraphAddNode(audioGraph, &playbackSpeedUnitDescription, &playbackSpeedNode));
|
||||
|
|
|
|||
Loading…
Reference in New Issue