~ubuntu-branches/ubuntu/vivid/ecasound2.2/vivid

« back to all changes in this revision

Viewing changes to libecasound/samplebuffer_iterators.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2009-11-02 18:22:35 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091102182235-4ngh7699dmkgonyu
Tags: 2.7.0-1
* New upstream release.
* Depend on libreadline-dev instead of libreadline5-dev by request of
  Mattias Klose. It's now libreadline6-dev. (closes: #553748)
* Update menu file to use section Applications/ instead of Apps/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <vector>
24
24
 
 
25
#include <kvu_dbc.h>
 
26
 
25
27
#include "samplebuffer.h"
26
28
#include "samplebuffer_iterators.h"
27
29
 
46
48
 
47
49
// ---------------------------------------------------------------------
48
50
 
 
51
void SAMPLE_ITERATOR_CHANNEL::init(SAMPLE_BUFFER* buf, int channel)
 
52
{
 
53
  target = buf; 
 
54
  index = 0; 
 
55
  channel_index = channel; 
 
56
 
 
57
  if (channel_index < 0 ||
 
58
      channel_index >= target->number_of_channels())
 
59
    index = target->buffersize_rep;
 
60
  DBC_CHECK(index == 0);
 
61
}
 
62
 
49
63
void SAMPLE_ITERATOR_CHANNEL::begin(int channel)
50
64
{
51
65
  index = 0;
52
66
  channel_index = channel;
 
67
 
53
68
  if (channel_index < 0 ||
54
69
      channel_index >= target->number_of_channels())
55
70
    index = target->buffersize_rep;
 
71
  DBC_CHECK(index == 0);
56
72
}
57
73
 
58
74
// ---------------------------------------------------------------------