2

I have coppied over AQRecorder from the speakHere example along with all the other needed files. After doing so I renamed any classes in the chain that uses it to .mm due to compilation errors, which seem to be resolved now. However I still cannot figure out how to use the AQRecorder class. There is another class in that example called SpeakHereController but that didnt work either. Here is the code for my latest attempt:

#import "AQRecorder.h"

    AQRecorder recorder;
    [recorder startRecord];

error: bad receiver type 'AQRecorder'

I know this wont work for a few reason, one its not calling the constructor, also I believe this should be a pointer. I have many different variations and like I said I also tried using SpeakHereController:

 SpeakHereController * recorder;
    recorder = [[SpeakHereController alloc]init];
        [recorder startRecord];

However this gives error:

Undefined symbols for architecture i386: "AQPlayer::StopQueue()", referenced from: -[SpeakHereController stopPlayQueue] in SpeakHereController.o

"AQPlayer::PauseQueue()", referenced from: -[SpeakHereController pausePlayQueue] in SpeakHereController.o

"AQPlayer::DisposeQueue(unsigned char)", referenced from: -[SpeakHereController stopRecord] in SpeakHereController.o

"AQPlayer::CreateQueueForFile(__CFString const*)", referenced from: -[SpeakHereController stopRecord] in SpeakHereController.o

"AQPlayer::StartQueue(signed char)", referenced from: -[SpeakHereController play:] in SpeakHereController.o interruptionListener(void*, unsigned long) in SpeakHereController.o

"AQPlayer::AQPlayer()", referenced from: -[SpeakHereController awakeFromNib] in SpeakHereController.o

"AQPlayer::~AQPlayer()", referenced from: -[SpeakHereController dealloc] in SpeakHereController.o

owen gerig
  • 6,165
  • 6
  • 52
  • 91

1 Answers1

1

I ended up using this

   SpeakHereController * recorder;
    recorder = [[SpeakHereController alloc]init];
    [recorder awakeFromNib];

However I only needed the recorder and for this to work I had to comment out all AQPlayer references from the file. For whatever reason it had a bunch of linker errors with the play methods.

the reason for calling awakeFromNib is that the method is alot like init, initializing all the settings for AQRecorder/AudioQueue

owen gerig
  • 6,165
  • 6
  • 52
  • 91