[vorbis-dev] Re: Encoding into MONO (delphi)

John Edwards john.edwards33 at ntlworld.com
Sat Feb 14 08:34:42 PST 2004



Well, I don't use/know delphi, but, the simplest way would be, I guess:

    buffer[j][i] := smallInt((pArray(@readbuffer)[i shl vi.channels + j shl 1 + 1] shl 8) or
                         pArray(@readbuffer)[i shl vi.channels + j shl 1 + 0]) / 32768 / 2;

In other words, simply halve the result of the original expression.

John

<p>----- Original Message ----- 
  From: Crock Real 
  To: vorbis-dev at xiph.org 
  Sent: Saturday, February 14, 2004 12:57 PM
  Subject: [vorbis-dev] Re: Encoding into MONO (delphi)

<p>  Oh, my God...yeah, it's simple, but as I told you, I'm stupid .... :-(

  This is "my" source (from Aleksandr Shamray)

  I := 0;
  While (i < readCount div 4) Do
  Begin
    for j := 0 to vi.channels - 1 do
      buffer[j][i] := smallInt((pArray(@readbuffer)[i shl vi.channels + j shl 1 + 1] shl 8) or
                           pArray(@readbuffer)[i shl vi.channels + j shl 1 + 0]) / 32768;
    inc(i);
  end;

  So, what should I change???
  It's valentine's day, so... pls, help! THX!
  ;-)
  crc

<p><p>------------------------------------------------------------------------------
  Do you Yahoo!?
  Yahoo! Finance: Get your refund fast by filing online

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list