Lines Matching refs:index
56 int index, other;
63 index = empty_index;
64 other = (index == 0 ? 1 : 0);
65 buffer_states[index] = BUFFER_BUSY;
72 return index;
75 static void put_empty(int index)
79 buffer_states[index] = BUFFER_EMPTY;
81 empty_index = index;
90 int index, other;
97 index = full_index;
98 other = (index == 0 ? 1 : 0);
99 buffer_states[index] = BUFFER_BUSY;
106 return index;
109 static void put_full(int index)
113 buffer_states[index] = BUFFER_FULL;
115 full_index = index;
149 int index = get_empty();
150 if (pcm_read(pcm, buffers[index], BUFFER_SIZE)) {
151 put_empty(index);
155 put_full(index);
168 int index, err;
173 index = get_full();
175 err = pcm_write(pcm, buffers[index], BUFFER_SIZE);
179 put_empty(index);