/[paths]/src/main.c
ViewVC logotype

Diff of /src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25 by ben, Sat Aug 18 08:47:41 2012 UTC revision 26 by ben, Sat Aug 18 09:30:09 2012 UTC
# Line 91  static int jack_process_callback(jack_nf Line 91  static int jack_process_callback(jack_nf
91          }          }
92    
93          /* get transport state, act in consequence */          /* get transport state, act in consequence */
94            state = jack_transport_query(app->jack->client, NULL);
95            if (state == JackTransportStopped) {
96                    if (app->jack->state == JackTransportRolling)
97                            { /* send not off everywhere! */ }
98                    app->jack->state = state;
99                    return 0;
100            }
101            app->jack->state = state;
102    
103          /* check end of all voices of all instruments */          /* check end of all voices of all instruments */
104          if (app->end >= app->count)          if (app->end >= app->count)
# Line 150  static int jack_process_callback(jack_nf Line 158  static int jack_process_callback(jack_nf
158    
159  static int jack_sync_callback(jack_transport_state_t state, jack_position_t *position, void *ctx)  static int jack_sync_callback(jack_transport_state_t state, jack_position_t *position, void *ctx)
160  {  {
161          struct instrument *instrument;          struct app *app;
162    
163          instrument = ctx;          app = ctx;
164    
165          if (state == JackTransportStarting) {          if (state == JackTransportStarting) {
166                  /* seek in paths  (???) according to position->frame */                  /* seek in paths  (???) according to position->frame */
167          } else if (state == JackTransportStopped) {          } else if (state == JackTransportStopped) {
                 /* pause */  
168          }          }
169    
170          return 1;          return 1;
# Line 243  int main (int argc, char *argv[]) Line 250  int main (int argc, char *argv[])
250                  exit(EXIT_FAILURE);                  exit(EXIT_FAILURE);
251          }          }
252    
253    
254            fprintf(stderr, "==========\n");
255          /* start playing (event loop) */          /* start playing (event loop) */
256          sleep(1);          sleep(60);
257            fprintf(stderr, "==========\n");
258                    
259          /* close jack */          /* close jack */
260          jack_client_close (jack.client);          jack_client_close (jack.client);

Legend:
Removed from v.25  
changed lines
  Added in v.26

  ViewVC Help
Powered by ViewVC 1.1.26