Changeset 3699:c6f202668788 in roaraudio


Ignore:
Timestamp:
04/25/10 01:12:00 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

test for correct header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_wave.c

    r3686 r3699  
    22 
    33/* 
    4  *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008 
     4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2010 
    55 * 
    66 *  This file is part of roard a part of RoarAudio, 
     
    7676  } 
    7777 
     78  // test the header, is this really a RIFF WAVE stream? 
     79  if ( strncmp(tbuf, "RIFF", 4) != 0 ) 
     80   return -1; 
     81 
     82  if ( strncmp(tbuf+8, "WAVEfmt ", 8) != 0 ) 
     83   return -1; 
     84 
     85  if ( strncmp(tbuf+36, "data", 4) != 0 ) 
     86   return -1; 
     87 
    7888  // TODO: write better code here! 
    7989 
Note: See TracChangeset for help on using the changeset viewer.