Changeset 1884:b3c32577c9c3 in roaraudio
- Timestamp:
- 05/23/09 21:28:38 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/midi.c
r1882 r1884 604 604 g_midi_cb.stoptime = ROAR_MATH_OVERFLOW_ADD(g_pos, samples_per_sec*t); 605 605 midi_cb_start(freq); 606 g_midi_cb.playing = 1;607 606 608 607 return 0; … … 610 609 611 610 int midi_cb_update (void) { 612 /* 613 if ( midi_cb_readbuf() == -1 ) 614 return -1; 615 */ 611 612 if ( !streams_get_flag(g_midi_cb.stream, ROAR_FLAG_MUTE) ) { 613 if ( midi_cb_readbuf() == -1 ) 614 return -1; 615 } else if ( g_midi_cb.playing ) { 616 midi_cb_stop(); 617 } 616 618 617 619 if ( !g_midi_cb.playing ) 618 620 return 0; 619 621 622 /* 620 623 if ( g_midi_cb.stoptime <= g_pos ) 621 624 midi_cb_stop(); 625 */ 622 626 623 627 ROAR_DBG("midi_cb_update(void) = ?"); … … 635 639 return -1; 636 640 641 g_midi_cb.playing = 1; 642 637 643 return 0; 638 644 #else … … 643 649 int midi_cb_stop (void) { 644 650 #ifdef __linux__ 651 int ret; 652 653 ret = midi_cb_start(0); 645 654 g_midi_cb.playing = 0; 646 return midi_cb_start(0); 655 656 return ret; 647 657 #else 648 658 return -1;
Note: See TracChangeset
for help on using the changeset viewer.