FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

Re: [linux-minidisc] netmd/netmdcli: download support for any .wav file containing pcm audio

<-- thread -->
<-- date -->
  • From: Thomas Arp <manner.moe@gmx.de>
  • To: "linux-minidisc@lists.fu-berlin.de" <linux-minidisc@lists.fu-berlin.de>
  • Date: Wed, 01 Jan 2014 22:04:57 +0100
  • Subject: Re: [linux-minidisc] netmd/netmdcli: download support for any .wav file containing pcm audio

Am 01.01.2014 20:42, schrieb Thomas Arp:
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

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.
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

<-- thread -->
<-- date -->
  • References:
    • [linux-minidisc] netmd/netmdcli: download support for any .wav file containing pcm audio
      • From: Thomas Arp <manner.moe@gmx.de>
  • linux-minidisc - January 2014 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the linux-minidisc mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal