forked from decarbonization/PlayerKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKCoreAudioDecoder.h
55 lines (38 loc) · 1.19 KB
/
PKCoreAudioDecoder.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* PKCoreAudioDecoder.h
* PKLite
*
* Created by Peter MacWhinnie on 5/23/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/
#ifndef PKCoreAudioDecoder_h
#define PKCoreAudioDecoder_h 1
#include "PKDecoder.h"
class PK_VISIBILITY_HIDDEN PKCoreAudioDecoder : public PKDecoder
{
protected:
ExtAudioFileRef mAudioFile;
UInt64 mCurrentFrameInFile;
AudioStreamBasicDescription mAudioStreamDescription;
CFURLRef mFileLocation;
public:
#pragma mark Lifetime
explicit PKCoreAudioDecoder(CFURLRef location);
virtual ~PKCoreAudioDecoder();
#pragma mark -
#pragma mark Attributes
virtual AudioStreamBasicDescription GetStreamFormat() const;
virtual CFURLRef CopyLocation() const;
#pragma mark -
virtual PKDecoder::FrameLocation GetTotalNumberOfFrames() const;
#pragma mark -
virtual bool CanSeek() const;
virtual PKDecoder::FrameLocation GetCurrentFrame() const;
virtual void SetCurrentFrame(PKDecoder::FrameLocation currentFrame);
#pragma mark -
#pragma mark Decoding
virtual UInt32 FillBuffers(AudioBufferList *buffers, UInt32 numberOfFrames) throw(RBException);
};
extern PKDecoder::Description PKCoreAudioDecoderDescription;
#endif /* PKCoreAudioDecoder_h */