Dominic, I missed seeing this question from you...
<das> rshann: the comment mentions a "pause mechanism", how does that work? The broad outline is that each time the portaudio backend makes its callback for another buffer full of samples there is a check, and (at least roughly) if the music is paused it is given a buffer filled with 0.0 values. I think other backends may need to use a different mechanism (because they don't initiate the request for samples?), and if that were developed then, for uniformity, portaudio backend could possibly follow suit and use the same. But I didn't really understand what these backends would be doing, they being not so easy to get working, e.g. setting up Alsa connections, or starting up jack etc. Richard On Tue, 2012-05-15 at 09:16 +0100, Richard Shann wrote: > Dominic, > > Further to this I just tried the git blame command and got this: > > git blame -C -L 68,68 src/portmidibackend.c > a03ecf7d (rshann 2012-01-09 18:16:18 +0000 68) return; > > Looking up that commit I find this comment: > > Implement the pause feature for playback. Note playback via midi backend > is disabled as it continues to update the playback time regardless of > pause. > > So it seems that if you re-enable the portmidi backend it will have the > bad effect that during a pause the playback time will continue to get > updated. The playhead will continue to move along the notes, although > the portaudio output is paused. > So that will be why I disconnected the code. To re-connect, it will > need to use the same sort of code as the portaudio backend to handle > time while pause is in effect. > > Richard > > > On Tue, 2012-05-15 at 09:08 +0100, Richard Shann wrote: > > Dominic, > > when you said on irc #denemo > > > what problem is the return statement in process_midi() (in > > > portmidibackend.c) supposed to solve? what would happen if i remove it? > > > > I answered thinking you were referring to the first return statement in > > process_midi(). > > > > But, now I look further I see the your point - I have put in another > > return to ignore the midi output backend. As the comment says, this is > > because I introduced the pause feature involving handling the time > > differently and I expected the portmidi output code would need altering. > > I haven't got any MIDI output device to test such code, so I don't know > > what it will do without that return statement - perhaps I should simply > > have let it happen and wait for feedback? > > If you can test it I would be most interested to know what happens, it > > can't possibly work complete with Pause, but it could be that it would > > still play. (In a similar vein, you will have noticed that I > > re-connected the non-threaded audio input code for inputting notes from > > a microphone, and it just works; it is safest to disconnect stuff that > > *may* cause problems while developing, but it is always worth trying to > > reconnect it afterwards to see if it does just work anyway). > > > > Richard > > > _______________________________________________ Denemo-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/denemo-devel
