Rev 374 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 374 | Rev 376 | ||
---|---|---|---|
Line 454... | Line 454... | ||
454 | int step; |
454 | int step; |
Line 455... | Line 455... | ||
455 | 455 | ||
456 | // Mixing channel index. |
456 | // Mixing channel index. |
457 | int chan; |
457 | int chan; |
458 | int i; |
- | |
459 | int flags; |
- | |
Line 460... | Line 458... | ||
460 | int size = 0; |
458 | int i; |
461 | 459 | ||
462 | // Left and right channel |
460 | // Left and right channel |
463 | // are in global mixbuffer, alternating. |
461 | // are in global mixbuffer, alternating. |
Line 479... | Line 477... | ||
479 | dr = 0; |
477 | dr = 0; |
Line 480... | Line 478... | ||
480 | 478 | ||
481 | // Love thy L2 chache - made this a loop. |
479 | // Love thy L2 chache - made this a loop. |
482 | // Now more channels could be set at compile time |
480 | // Now more channels could be set at compile time |
483 | // as well. Thus loop those channels. |
- | |
Line 484... | Line 481... | ||
484 | // flags=0; |
481 | // as well. Thus loop those channels. |
485 | 482 | ||
486 | for ( chan = 0; chan < NUM_CHANNELS; chan++ ) |
483 | for ( chan = 0; chan < NUM_CHANNELS; chan++ ) |
487 | { |
484 | { |
488 | // Check channel, if active. |
485 | // Check channel, if active. |
489 | if (channels[ chan ]) |
- | |
490 | { |
- | |
491 | // flags=1; |
486 | if (channels[ chan ]) |
492 | 487 | { |
|
493 | // Get the raw data from the channel. |
488 | // Get the raw data from the channel. |
494 | sample = *channels[ chan ]; |
489 | sample = *channels[ chan ]; |
495 | // Add left and right part |
490 | // Add left and right part |
Line 533... | Line 528... | ||
533 | *rightout = dr; |
528 | *rightout = dr; |
Line 534... | Line 529... | ||
534 | 529 | ||
535 | // Increment current pointers in mixbuffer. |
530 | // Increment current pointers in mixbuffer. |
536 | leftout += step; |
531 | leftout += step; |
537 | rightout += step; |
- | |
538 | // if (flags) |
- | |
539 | // size+=4; |
532 | rightout += step; |
Line 540... | Line 533... | ||
540 | } |
533 | } |
541 | - | ||
542 | SetBuffer(hMixBuff,mixbuffer,mix_offset,mix_size); |
- | |
543 | - | ||
544 | - | ||
545 | // WaveOut(hMixBuff,(char*)&mixbuffer[0],4096); |
- | |
546 | - | ||
547 | // if(size) |
- | |
548 | // { |
- | |
549 | // WaveOut(hMixBuff,(char*)&mixbuffer[0],size); |
- | |
550 | // SetBufferPos(hMixBuff, 0); |
- | |
551 | // SetBuffer(hMixBuff,(char*)&mixbuffer[0],mix_offset,4096); |
- | |
552 | // PlayBuffer(hMixBuff, PCM_SYNC); |
534 | |
Line 553... | Line 535... | ||
553 | // }; |
535 | SetBuffer(hMixBuff,mixbuffer,mix_offset,mix_size); |
554 | } |
536 | } |