Changeset 243

Show
Ignore:
Timestamp:
03/11/07 15:35:14 (1 year ago)
Author:
aldacron
Message:

[DerelictOgg?]
* when I merged ogg.d and oggtypes.d recently, it turns out that I broke DerelictVorbis? by doing so. oggtypes.d is back.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DerelictOgg/derelict/ogg/ogg.d

    r237 r243  
    11/* 
    2  * Copyright (c) 2005-2006 Derelict Developers 
     2 * Copyright (c) 2005-2007 Derelict Developers 
    33 * All rights reserved. 
    44 * 
     
    3232module derelict.ogg.ogg; 
    3333 
    34 private import derelict.util.loader; 
    35  
    36 //============================================================================== 
    37 // TYPES 
    38 //============================================================================== 
    39 alias long      ogg_int64_t; 
    40 alias int       ogg_int32_t; 
    41 alias uint      ogg_uint32_t; 
    42 alias short     ogg_int16_t; 
    43 alias ushort    ogg_uint16_t; 
    44  
    45 struct oggpack_buffer 
    46 {   int endbyte; 
    47     int endbit; 
    48     ubyte* buffer; 
    49     ubyte* ptr; 
    50     int storage; 
     34private  
     35
     36    import derelict.util.loader; 
     37    import derelict.ogg.oggtypes; 
    5138} 
    5239 
    53 struct ogg_page 
    54 {   ubyte *header; 
    55     int  header_len; 
    56     ubyte *_body;       // originally named "body", but that's a keyword in D. 
    57     int  body_len; 
    58 } 
    59  
    60 struct ogg_stream_state 
    61 {   ubyte  *body_data; 
    62     int     body_storage; 
    63     int     body_fill; 
    64     int     body_returned; 
    65     int     *lacing_vals; 
    66     ogg_int64_t *granule_vals; 
    67     int     lacing_storage; 
    68     int     lacing_fill; 
    69     int     lacing_packet; 
    70     int     lacing_returned; 
    71     ubyte   header[282]; 
    72     int     header_fill; 
    73     int     e_o_s; 
    74     int     b_o_s; 
    75     int     serialno; 
    76     int     pageno; 
    77     ogg_int64_t  packetno; 
    78     ogg_int64_t   granulepos; 
    79 } 
    80  
    81 struct ogg_packet 
    82 {   ubyte *packet; 
    83     int   bytes; 
    84     int   b_o_s; 
    85     int   e_o_s; 
    86     ogg_int64_t  granulepos; 
    87     ogg_int64_t  packetno; 
    88 } 
    89  
    90 struct ogg_sync_state 
    91 {   ubyte *data; 
    92     int storage; 
    93     int fill; 
    94     int returned; 
    95  
    96     int unsynced; 
    97     int headerbytes; 
    98     int bodybytes; 
    99 } 
    100  
    101 //============================================================================== 
    102 // FUNCS 
    103 //============================================================================== 
    10440private void loadOgg(SharedLib lib) 
    10541{