========source code============ public void startRecording() { Log.d("startRecoding", "recordStart" ); String openPath = "/mnt/sdcard/mp3/lolypoly.wav"; String recPath = openPath; recPath = recPath.substring(0, recPath.length()-4); recPath += "_rec.wav"; recFile = new File(recPath).getAbsolutePath();
PdBase.sendMessage("#play_and_record", "play", 1);
PdBase.sendMessage("#play_and_record", "openpf", openPath);
PdBase.sendMessage("#play_and_record", "openrf", recPath);
PdBase.sendMessage("#play_and_record", "record", 1);
}
public void stopRecording() { PdBase.sendMessage("#play_and_record", "record", 0); PdBase.sendMessage("#play_and_record", "play", 0); }
========pd file ==============
============================
Hello, i have question about android code with pdcore.
My source code and pd file are like above. it looks working because the lolypoly.wav file has created. but, the size is 44kb and when the startRecording function called, i can not hear sound from mobile.
i can see a few warnning when the pdservice has been started - info/warning (1,44) - mediaplayer went away with unhandled events - no input buffer available
is it releavant to this warnning?
i don't know why, could somebody let me know how to solve ths problem.
The warnings are harmless, I think. Based on what you've written, it's hard to tell what's going wrong. You can look at the ScenePlayer project in Pd for Android if you want to see some sample code that records wav files.
It looks like you're new here. If you want to get involved, click one of these buttons!