Skip to content

Commit

Permalink
Merge pull request #276 from pcbeard/CanonicalAudioDescription
Browse files Browse the repository at this point in the history
Add +canonicalAudioStreamBasicDescription to access format of PCM data
  • Loading branch information
diegostamigni committed Mar 19, 2019
2 parents 568b3a5 + b71fc0e commit bc0c0d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions StreamingKit/StreamingKit/STKAudioPlayer.h
Expand Up @@ -182,6 +182,9 @@ typedef void(^STKFrameFilter)(UInt32 channelsPerFrame, UInt32 bytesPerFrame, UIn
/// URLs with unrecognised schemes will return nil.
+(STKDataSource*) dataSourceFromURL:(NSURL*)url;

/// Returns canonical audio format used by STKFrameFilter blocks.
+(AudioStreamBasicDescription)canonicalAudioStreamBasicDescription;

/// Initializes a new STKAudioPlayer with the default options
-(instancetype) init;

Expand Down
5 changes: 5 additions & 0 deletions StreamingKit/StreamingKit/STKAudioPlayer.m
Expand Up @@ -692,6 +692,11 @@ +(STKDataSource*) dataSourceFromURL:(NSURL*)url
return retval;
}

+ (AudioStreamBasicDescription)canonicalAudioStreamBasicDescription
{
return canonicalAudioStreamBasicDescription;
}

-(void) clearQueue
{
pthread_mutex_lock(&playerMutex);
Expand Down

0 comments on commit bc0c0d0

Please sign in to comment.