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. | |
Audio Pasteboard interface.
This class manages importing from and exporting to the general audio pasteboard.
| + (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.
| path | The target file path |
| fileType | The type of the file to create |
| sampleRate | The target sample rate, or 0 to use the sample rate of the pasteboard audio |
| channelCount | The target channel count, or 0 to use the channel count of the pasteboard audio |
| completionBlock | Block 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.
| path | The path of the source audio file; all Core Audio-supported formats accepted |
| completionBlock | Block 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.
| generator | The generator block |
| audioDescription | The audio description describing the audio produced by the generator block |
| completionBlock | Block to call upon completion, or failure |