// we ignore velocity, since doppler's broken in the Linux AL at the moment...
// adjust existing positions...
- for (int i = 0; i < num_channels; i++) {
+ for (unsigned i = 0; i < num_channels; i++) {
const float *p = impl_channels[i].position;
set_channel_position(i, p[0], p[1], p[2]);
}
{
if (!initialized)
return false;
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
if (pos != NULL)
{
if (!initialized)
return false;
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
set_channel_position(channel, pos.x, pos.y, -pos.z);
num_channels = maxsoftwarechannels;
impl_channels = new OPENAL_Channels[maxsoftwarechannels];
memset(impl_channels, '\0', sizeof (OPENAL_Channels) * num_channels);
- for (int i = 0; i < num_channels; i++)
+ for (unsigned i = 0; i < num_channels; i++)
alGenSources(1, &impl_channels[i].sid); // !!! FIXME: verify this didn't fail!
initialized = true;
ALCcontext *ctx = alcGetCurrentContext();
if (ctx) {
- for (int i = 0; i < num_channels; i++) {
+ for (unsigned i = 0; i < num_channels; i++) {
alSourceStop(impl_channels[i].sid);
alSourcei(impl_channels[i].sid, AL_BUFFER, 0);
alDeleteSources(1, &impl_channels[i].sid);
{
if (!initialized)
return NULL;
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return NULL;
return impl_channels[channel].sample;
}
{
if (!initialized)
return false;
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
if (impl_channels[channel].startpaused)
return(true);
{
if (!initialized)
return 0;
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return 0;
ALint loop = 0;
alGetSourceiv(impl_channels[channel].sid, AL_LOOPING, &loop);
{
if (!initialized)
return false;
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
ALint state = 0;
alGetSourceiv(impl_channels[channel].sid, AL_SOURCE_STATE, &state);
if (dsp != NULL)
return -1;
if (channel == OPENAL_FREE) {
- for (int i = 0; i < num_channels; i++) {
+ for (unsigned i = 0; i < num_channels; i++) {
ALint state = 0;
alGetSourceiv(impl_channels[i].sid, AL_SOURCE_STATE, &state);
if ((state != AL_PLAYING) && (state != AL_PAUSED)) {
}
}
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return -1;
alSourceStop(impl_channels[channel].sid);
impl_channels[channel].sample = sptr;
while ( (rc = ov_read(&vf, buf, sizeof (buf), bigendian, 2, 1, &bitstream)) != 0 ) {
if (rc > 0) {
size += rc;
- if (size >= allocated) {
+ if (size >= (int)allocated) {
allocated *= 2;
ALubyte *tmp = (ALubyte *) realloc(retval, allocated);
if (tmp == NULL) {
if (!initialized)
return;
if (sptr) {
- for (int i = 0; i < num_channels; i++) {
+ for (unsigned i = 0; i < num_channels; i++) {
if (impl_channels[i].sample == sptr) {
alSourceStop(impl_channels[i].sid);
alSourcei(impl_channels[i].sid, AL_BUFFER, 0);
if (!initialized)
return false;
if (channel == OPENAL_ALL) {
- for (int i = 0; i < num_channels; i++)
+ for (unsigned i = 0; i < num_channels; i++)
OPENAL_SetFrequency(i, slomo);
return true;
}
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
if (slomo)
alSourcef(impl_channels[channel].sid, AL_PITCH, ((ALfloat) slomofreq) / 44100.0f);
return false;
if (channel == OPENAL_ALL) {
- for (int i = 0; i < num_channels; i++)
+ for (unsigned i = 0; i < num_channels; i++)
OPENAL_SetVolume(i, vol);
return true;
}
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
if (vol < 0)
return false;
if (channel == OPENAL_ALL) {
- for (int i = 0; i < num_channels; i++)
+ for (unsigned i = 0; i < num_channels; i++)
OPENAL_SetPaused(i, paused);
return true;
}
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
ALint state = 0;
return false;
if (channel == OPENAL_ALL) {
- for (int i = 0; i < num_channels; i++)
+ for (unsigned i = 0; i < num_channels; i++)
OPENAL_StopSound(i);
return true;
}
- if ((channel < 0) || (channel >= num_channels))
+ if ((channel < 0) || (channel >= (int)num_channels))
return false;
alSourceStop(impl_channels[channel].sid);
impl_channels[channel].startpaused = false;
{
if (!initialized)
return false;
- for (int i = 0; i < num_channels; i++) {
+ for (unsigned i = 0; i < num_channels; i++) {
if (impl_channels[i].sample == (OPENAL_SAMPLE *) stream) {
alSourceStop(impl_channels[i].sid);
impl_channels[i].startpaused = false;