| 487 | | // if((nb_periods % 32)==0) { |
|---|
| 488 | | // // debugOutput(DEBUG_LEVEL_NORMAL, "\r%05d periods",nb_periods); |
|---|
| 489 | | // } |
|---|
| 490 | | |
|---|
| 491 | | // for(i=0;i<nb_in_channels;i++) { |
|---|
| 492 | | // |
|---|
| 493 | | // |
|---|
| 494 | | // switch (ffado_streaming_get_capture_stream_type(dev,i)) { |
|---|
| 495 | | // case ffado_stream_type_audio: |
|---|
| 496 | | // // no need to get the buffers manually, we have set the API internal buffers to the audiobuffer[i]'s |
|---|
| 497 | | // // //samplesread=freebob_streaming_read(dev, i, audiobuffer[i], arguments.period); |
|---|
| 498 | | // samplesread=arguments.period; |
|---|
| 499 | | // break; |
|---|
| 500 | | // case ffado_stream_type_midi: |
|---|
| 501 | | // //samplesread=ffado_streaming_read(dev, i, audiobuffers_out[i], arguments.period); |
|---|
| 502 | | // break; |
|---|
| 503 | | // default: break; |
|---|
| 504 | | // } |
|---|
| 505 | | // |
|---|
| 506 | | // // fprintf(fid_in[i], "---- Period read (%d samples) ----\n",samplesread); |
|---|
| 507 | | // // hexDumpToFile(fid_in[i],(unsigned char*)audiobuffers_in[i],samplesread*sizeof(float)+1); |
|---|
| 508 | | // } |
|---|
| 509 | | |
|---|
| 510 | | // for(i=0;i<nb_out_channels;i++) { |
|---|
| 511 | | // float *buff; |
|---|
| 512 | | // int sampleswritten=0; |
|---|
| 513 | | // if (i<nb_in_channels) { |
|---|
| 514 | | // buff=audiobuffers_out[i]; |
|---|
| 515 | | // } else { |
|---|
| 516 | | // buff=nullbuffer; |
|---|
| 517 | | // } |
|---|
| 518 | | // |
|---|
| 519 | | // switch (ffado_streaming_get_playback_stream_type(dev,i)) { |
|---|
| 520 | | // case ffado_stream_type_audio: |
|---|
| 521 | | // // sampleswritten=freebob_streaming_write(dev, i, buff, arguments.period); |
|---|
| 522 | | // sampleswritten=arguments.period; |
|---|
| 523 | | // break; |
|---|
| 524 | | // case ffado_stream_type_midi: |
|---|
| 525 | | // // sampleswritten=freebob_streaming_write(dev, i, buff, arguments.period); |
|---|
| 526 | | // break; |
|---|
| 527 | | // default: break; |
|---|
| 528 | | // } |
|---|
| 529 | | // // fprintf(fid_out[i], "---- Period write (%d samples) ----\n",sampleswritten); |
|---|
| 530 | | // // hexDumpToFile(fid_out[i],(unsigned char*)buff,sampleswritten*sizeof(ffado_sample_t)); |
|---|
| 531 | | // } |
|---|