Thursday, April 17, 2008

more strategery

Well I am still not having any fortune with recording audio. My blackberry comes with an application that does what I'm trying to do (at this point), which is record some audio and play it back. It has a very cool interface, it's called "voice notes".

That got me thinking that I might be able to do some trickery to find out how they are recording audio. However a quick search did not allow me to find a way to get the application onto my computer easily. So I found a third party application that does the same thing, and they distribute a build for the blackberry. So I downloaded the .cod file and started beating on it with hammers and screwdrivers and crowbars in the typical UNIX way. I was able to feed it to unzip, which apparently removed the compression. Then I tried to feed it to the jad java decompiler, but it wasn't recognizable as a class file. After talking about this during a smoke break, it occurred to me to run strings on it. strings found stuff of course. Then I thought, what do I really need from this thing? If I at least have the URL that is used when create-ing the "player" to record audio, that is a great clue as to what will actually work. So I just ran strings and grepped for "capture", et voila :) I found the URL.

That still isn't working. I was assuming that I could use Alerts as debugging output, but that doesn't seem to be working as I thought. So I think that I will have to update the Display with text that tells me what part of the code that the application is in while it's running. At least that should give me some more insight as to what is actually happening on the phone. Also I think I will put in a check to get sizeof when recording, so that I can get verification that recording is actually happening.

Stupid amount of work to get something working that is supposed to work according to the API, according to both Sun and RIM. But stupid is okay, I'm used to stupid :/

Shame that the emulator doesn't help; the MMAPI stuff is not implemented in the emulator, so it just gives a nice big stack trace at the recording part of the code.

Onward.

No comments: