2005-06-02 18:16:43 +00:00
|
|
|
//
|
|
|
|
// MusepackFile.h
|
|
|
|
// zyVorbis
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 1/23/05.
|
2005-07-02 21:02:06 +00:00
|
|
|
// Copyright 2005 Vincent Spader All rights reserved.
|
2005-06-02 18:16:43 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2008-02-08 00:08:56 +00:00
|
|
|
#import <mpcdec/mpcdec.h>
|
2014-10-20 00:42:04 +00:00
|
|
|
#import <mpcdec/decoder.h>
|
|
|
|
#import <mpcdec/internal.h>
|
2007-02-24 20:36:27 +00:00
|
|
|
#import "Plugin.h"
|
2005-06-02 18:16:43 +00:00
|
|
|
|
2007-02-24 20:36:27 +00:00
|
|
|
@interface MusepackDecoder : NSObject <CogDecoder>
|
|
|
|
{
|
2007-03-04 18:41:43 +00:00
|
|
|
id<CogSource> source;
|
2014-10-20 00:42:04 +00:00
|
|
|
mpc_reader reader;
|
|
|
|
mpc_demux* demux;
|
2007-03-04 20:47:49 +00:00
|
|
|
mpc_streaminfo info;
|
|
|
|
|
2007-02-24 20:36:27 +00:00
|
|
|
char buffer[MPC_FRAME_LENGTH*4];
|
2008-02-10 16:18:23 +00:00
|
|
|
int bufferFrames;
|
2007-02-24 20:36:27 +00:00
|
|
|
|
|
|
|
int bitrate;
|
|
|
|
float frequency;
|
2008-02-10 16:18:23 +00:00
|
|
|
long totalFrames;
|
2005-06-02 18:16:43 +00:00
|
|
|
}
|
2013-10-05 21:15:09 +00:00
|
|
|
- (BOOL)writeToBuffer:(float *)sample_buffer fromBuffer:(const MPC_SAMPLE_FORMAT *)p_buffer frames:(unsigned)frames;
|
2005-06-02 18:16:43 +00:00
|
|
|
|
2007-03-04 18:41:43 +00:00
|
|
|
- (void)setSource:(id<CogSource>)s;
|
|
|
|
- (id<CogSource>)source;
|
2005-06-02 18:16:43 +00:00
|
|
|
|
|
|
|
@end
|