@@ -126,10 +126,10 @@ fn read_wav_file_samples(fpath string) ?[]f32 {
126126 mut offset := u32 (0 )
127127 rh := & RIFFHeader (pbytes)
128128 // eprintln('rh: $rh')
129- if rh.riff != [`R` , `I` , `F` , `F` ]!! {
129+ if rh.riff != [byte ( `R` ) , `I` , `F` , `F` ]!! {
130130 return error ('WAV should start with `RIFF`' )
131131 }
132- if rh.form_type != [`W` , `A` , `V` , `E` ]!! {
132+ if rh.form_type != [byte ( `W` ) , `A` , `V` , `E` ]!! {
133133 return error ('WAV should have `WAVE` form type' )
134134 }
135135 if rh.file_size + 8 != bytes.len {
@@ -147,15 +147,15 @@ fn read_wav_file_samples(fpath string) ?[]f32 {
147147 // eprintln('ch: $ch')
148148 // eprintln('p: $pbytes | offset: $offset | bytes.len: $bytes.len')
149149 // ////////
150- if ch.chunk_type == [`L` , `I` , `S` , `T` ]!! {
150+ if ch.chunk_type == [byte ( `L` ) , `I` , `S` , `T` ]!! {
151151 continue
152152 }
153153 //
154- if ch.chunk_type == [`i` , `d` , `3` , ` ` ]!! {
154+ if ch.chunk_type == [byte ( `i` ) , `d` , `3` , ` ` ]!! {
155155 continue
156156 }
157157 //
158- if ch.chunk_type == [`f` , `m` , `t` , ` ` ]!! {
158+ if ch.chunk_type == [byte ( `f` ) , `m` , `t` , ` ` ]!! {
159159 // eprintln('`fmt ` chunk')
160160 rf = & RIFFFormat (& ch.chunk_data)
161161 // eprintln('fmt riff format: $rf')
@@ -171,7 +171,7 @@ fn read_wav_file_samples(fpath string) ?[]f32 {
171171 continue
172172 }
173173 //
174- if ch.chunk_type == [`d` , `a` , `t` , `a` ]!! {
174+ if ch.chunk_type == [byte ( `d` ) , `a` , `t` , `a` ]!! {
175175 if rf == 0 {
176176 return error ('`data` chunk should be after `fmt ` chunk' )
177177 }
0 commit comments