AEAudioPasteboard Class Reference

Audio Pasteboard interface. More...

#import <AEAudioPasteboard.h>

Inherits NSObject.

Class Methods

(NSDictionary *) + infoForGeneralPasteboardItem
 Get info about the current pasteboard item.
 
(void) + pasteToFileAtPath:fileType:sampleRate:channelCount:completionBlock:
 Paste the pasteboard contents to a file.
 
(void) + copyFromFileAtPath:completionBlock:
 Copy to the pasteboard from a file.
 
(void) + copyUsingGenerator:audioDescription:completionBlock:
 Copy to the pasteboard using a generator block.
 

Detailed Description

Audio Pasteboard interface.

This class manages importing from and exporting to the general audio pasteboard.

Method Documentation

+ (NSDictionary *) infoForGeneralPasteboardItem

Get info about the current pasteboard item.

Returns a dictionary of items (keyed by the AEAudioPasteboardInfo keys), or nil if there's no audio on the pasteboard

+ (void) pasteToFileAtPath: (NSString *)  path
fileType: (AEAudioFileType)  fileType
sampleRate: (double)  sampleRate
channelCount: (int)  channelCount
completionBlock: (NSError *errorOrNil)  completionBlock 

Paste the pasteboard contents to a file.

This method asynchronously writes the pasteboard contents to a file of the given type, rate and channel count.

Parameters
pathThe target file path
fileTypeThe type of the file to create
sampleRateThe target sample rate, or 0 to use the sample rate of the pasteboard audio
channelCountThe target channel count, or 0 to use the channel count of the pasteboard audio
completionBlockBlock to call upon completion, or failure
+ (void) copyFromFileAtPath: (NSString *)  path
completionBlock: (NSError *errorOrNil)  completionBlock 

Copy to the pasteboard from a file.

This method asynchronously writes the contents of an audio file to the pasteboard.

Parameters
pathThe path of the source audio file; all Core Audio-supported formats accepted
completionBlockBlock to call upon completion, or failure
+ (void) copyUsingGenerator: (AEAudioPasteboardGeneratorBlock generator
audioDescription: (AudioStreamBasicDescription)  audioDescription
completionBlock: (NSError *errorOrNil)  completionBlock 

Copy to the pasteboard using a generator block.

Use this method to write to the pasteboard using audio generated dynamically using the given block.

Parameters
generatorThe generator block
audioDescriptionThe audio description describing the audio produced by the generator block
completionBlockBlock to call upon completion, or failure

The documentation for this class was generated from the following file: