• Home
  • Raw
  • Download

Lines Matching refs:audio

62 static void VbGetDevMusicNotes(VbAudioContext *audio, int use_short)  in VbGetDevMusicNotes()  argument
85 if (!audio->background_beep) in VbGetDevMusicNotes()
192 audio->music_notes = notebuf; in VbGetDevMusicNotes()
193 audio->note_count = count; in VbGetDevMusicNotes()
194 audio->free_notes_when_done = 1; in VbGetDevMusicNotes()
200 audio->music_notes = builtin; in VbGetDevMusicNotes()
201 audio->note_count = count; in VbGetDevMusicNotes()
202 audio->free_notes_when_done = 0; in VbGetDevMusicNotes()
212 VbAudioContext *audio = &au; in VbAudioOpen() local
227 Memset(audio, 0, sizeof(*audio)); in VbAudioOpen()
228 audio->background_beep = 1; in VbAudioOpen()
229 audio->play_until = b; /* "zero" starts now */ in VbAudioOpen()
234 audio->background_beep = 0; in VbAudioOpen()
247 VbGetDevMusicNotes(audio, use_short); in VbAudioOpen()
248 VBDEBUG(("VbAudioOpen() - note count %d\n", audio->note_count)); in VbAudioOpen()
250 return audio; in VbAudioOpen()
256 int VbAudioLooping(VbAudioContext *audio) in VbAudioLooping() argument
259 uint16_t freq = audio->current_frequency; in VbAudioLooping()
264 while (audio->next_note < audio->note_count && in VbAudioLooping()
265 now >= audio->play_until) { in VbAudioLooping()
266 freq = audio->music_notes[audio->next_note].frequency; in VbAudioLooping()
267 msec = audio->music_notes[audio->next_note].msec; in VbAudioLooping()
268 audio->play_until += VbMsecToTicks(msec); in VbAudioLooping()
269 audio->next_note++; in VbAudioLooping()
272 if (now >= audio->play_until) { in VbAudioLooping()
278 if (audio->background_beep) { in VbAudioLooping()
279 if (audio->current_frequency != freq) { in VbAudioLooping()
281 audio->current_frequency = freq; in VbAudioLooping()
288 audio->last_time = now; in VbAudioLooping()
295 void VbAudioClose(VbAudioContext *audio) in VbAudioClose() argument
298 if (audio->free_notes_when_done) in VbAudioClose()
299 VbExFree(audio->music_notes); in VbAudioClose()