Am 01.01.2014 20:42, schrieb Thomas Arp:
I fixed a bug in my patch, i changed the byte order conversion loop since my first try but forgot to change loop condition expression.Hi,i made some changes to libnetmd and netmdcli to support download of audio files in pcm format (filename: *.wav, codec: pcm, 16 bit, 4100 Hz, stereo). Codec used on the minidisc is Atrac SP stereo, but this can be changed anytime if wanted.Thomas
Apply this patch to my last one. Thomas
>From 57e22794e026ed2f88ba71f5353d445c3f7eb095 Mon Sep 17 00:00:00 2001 From: Thomas Arp <manner.moe@gmx.de> Date: Wed, 1 Jan 2014 21:59:13 +0100 Subject: [PATCH 2/2] fixed a bug in byte order conversion loop --- netmdcli/netmdcli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netmdcli/netmdcli.c b/netmdcli/netmdcli.c index 41559e2..fb54289 100644 --- a/netmdcli/netmdcli.c +++ b/netmdcli/netmdcli.c @@ -555,7 +555,7 @@ int main(int argc, char* argv[]) puts(netmd_strerror(error)); /* audio data byte order conversion, .wav files are little endian, need big endian for pcm raw data*/ - for(i = 0; i < audio_data_size/2; i+=2) + for(i = 0; i < audio_data_size; i+=2) { unsigned char first = audio_data[i]; audio_data[i] = audio_data[i+1]; -- 1.7.10.4