Jeff I did some benchmarking first. I have versions of my algorithms in both C++ and Java. I sample at 22KHz for 12 seconds and perform an SFTF on 2048 sample frames with a 75% overlap in order to transcribe what the user has played on their instrument. I do some other stuff on the spectrum to figure out the F0 and I have a mechanism for filtering out some of the transcribed notes that I've described in my papers:
http://www.comp.dit.ie/bduggan/research.php C++ code to do this on the iPhone 3G takes about 12 seconds to do the DSP. This is about 50% faster on an iPhone 4G 100% Java code to do the identical task on a 1Ghz HTC Desire takes minutes (running Android 2.1). I dont have the exact numbers, but basically not practical. The same code running on WIndows 7, JDK takes a few seconds. The identical C++ implementation I use on the iPhone I call on Android using the Android NDK and it only takes a few secomds Conclusion - Android Java on 2.1 is slow for maths intensive code. DSP in Java on Android 2.1 or less is not practical. It has to be done in native code. Thats why Im a bit reluctant to consider a Win Phone 7 version of my app - no native code. Hope that helps! Bryan On Aug 12, 4:04 pm, Jeff Knaggs <jeffakna...@gmail.com> wrote: > I'm curious, you do a copy with C++; did you do this because you > assumed/thought you needed the extra speed boost? I.e., not because > you're then going to use a bunch of other (already written ;-) C++ to > process the data). If the answer is YES -- "for speed," did you do > any benchmarking to see if this was truly an issue? And, if YES, would > you be willing to share the benchmarking data? > > On another note, would you mind if I emailed you directly on some > question related to audio but unrelated to this thread? If you decide > that topic is worthy of being posted/shared in this group, we can move > it over. > > thanks > jeff knaggs -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en