comparison src/psf2/plugin.c @ 2738:d0011cde16b7

blah blah blah
author William Pitcock <nenolod@atheme.org>
date Mon, 30 Jun 2008 20:46:42 -0500
parents 62cc6d667119
children f16fdcabe069
comparison
equal deleted inserted replaced
2737:62cc6d667119 2738:d0011cde16b7
142 type++; 142 type++;
143 } 143 }
144 } 144 }
145 145
146 // now did we identify it above or just fall through? 146 // now did we identify it above or just fall through?
147 if (types[type].sig != 0xffffffff) 147 if (types[type].sig == 0xffffffff)
148 {
149 printf("File identified as %s\n", types[type].name);
150 }
151 else
152 { 148 {
153 printf("ERROR: File is unknown, signature bytes are %02x %02x %02x %02x\n", buffer[0], buffer[1], buffer[2], buffer[3]); 149 printf("ERROR: File is unknown, signature bytes are %02x %02x %02x %02x\n", buffer[0], buffer[1], buffer[2], buffer[3]);
154 free(buffer); 150 free(buffer);
155 return -1; 151 return -1;
156 } 152 }
157 153
158 if ((*types[type].start)(buffer, size) != AO_SUCCESS) 154 if (psf2_start(buffer, size) != AO_SUCCESS)
159 { 155 {
160 free(buffer); 156 free(buffer);
161 printf("ERROR: Engine rejected file!\n"); 157 printf("ERROR: Engine rejected file!\n");
162 return -1; 158 return -1;
163 } 159 }
164 160
165 m1sdr_Init(44100); 161 m1sdr_Init(44100);
166 m1sdr_SetCallback(psf2_gen); 162 m1sdr_SetCallback(psf2_gen);
167 m1sdr_PlayStart(); 163 m1sdr_PlayStart();
168
169 printf("\n\nPlaying. Press CTRL-C to stop.\n");
170 164
171 while (1) 165 while (1)
172 { 166 {
173 m1sdr_TimeCheck(); 167 m1sdr_TimeCheck();
174 } 168 }