[vorbis-dev] Encoding in Delphi - Help

Crock Real integracrock at yahoo.com
Sat Nov 8 10:13:41 PST 2003



>Well I compared with encoder_example.c and it seems to be a good 
>translation. I take it the Ogg file it generates does not work? Or 
>is it just a performance problem?
 
It's working, but it's very slow. That's all.
 
I use audioconv unit from Matthijs Laan:
 
procedure uninterleave(buffer: p_float_p_float_array; readbuffer: p_signed_char_array; samples: long);
var
  i: long;
begin
  for i := 0 to samples-1 do
  begin
    buffer^[0]^[i] := ((readbuffer^[i*4+1] shl 8) or (readbuffer^[i*4] and $ff))/32768;
    buffer^[1]^[i] := ((readbuffer^[i*4+3] shl 8) or (readbuffer^[i*4+2] and $ff))/32768;
  end;
end;
 
procedure uninterleave_little_endian(buffer: p_float_p_float_array; readbuffer: p_signed_char_array; samples: long);
var
  i: long;
type
  p_ogg_int16_array = ^t_ogg_int16_array;
  t_ogg_int16_array = packed array[0..maxint div SizeOf(ogg_int16_t)-1] of ogg_int16_t;
begin
  for i := 0 to samples-1 do
  begin
    buffer^[0]^[i] := p_ogg_int16_array(readbuffer)^[i*2]/32768;
    buffer^[1]^[i] := p_ogg_int16_array(readbuffer)^[i*2+1]/32768;
  end;
end;
 
I encode a pcm file (without header), and both procedures work. Why?

Has somebody made a working encoder in delphi???????
Could I send my prog???? It's very small (20 kbyte).

<p><p>---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
--- >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