echo: fixes 64 bit warnings
This commit is contained in:
@@ -131,13 +131,15 @@ midi_read(void* cookie, off_t pos, void* ptr, size_t* nread)
|
|||||||
|
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
midi_write(void* cookie, off_t pos, const void* ptr, size_t* nwritten)
|
midi_write(void* cookie, off_t pos, const void* ptr, size_t* _nwritten)
|
||||||
{
|
{
|
||||||
echo_dev *card = (echo_dev *) cookie;
|
echo_dev *card = (echo_dev *) cookie;
|
||||||
ECHOSTATUS err;
|
ECHOSTATUS err;
|
||||||
|
DWORD nwritten = *_nwritten;
|
||||||
|
|
||||||
LOG(("midi_write()\n"));
|
LOG(("midi_write()\n"));
|
||||||
|
|
||||||
err = card->pEG->WriteMidi(*nwritten, (PBYTE)ptr, nwritten);
|
err = card->pEG->WriteMidi(nwritten, (PBYTE)ptr, &nwritten);
|
||||||
|
*_nwritten = nwritten;
|
||||||
return (err != ECHOSTATUS_OK) ? B_ERROR : B_OK;
|
return (err != ECHOSTATUS_OK) ? B_ERROR : B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ echo_channel_get_mix(void *card, MIXER_AUDIO_CHANNEL channel, int32 type, float
|
|||||||
} else {
|
} else {
|
||||||
values[0] = function[0].Data.iNominal == 4 ? 1.0 : 0.0;
|
values[0] = function[0].Data.iNominal == 4 ? 1.0 : 0.0;
|
||||||
}
|
}
|
||||||
PRINT(("echo_channel_get_mix iLevel: %ld, %d, %ld\n", function[0].Data.iLevel,
|
PRINT(("echo_channel_get_mix iLevel: %" B_PRId32 ", %d, %" B_PRIu32
|
||||||
channel.wChannel, channel.dwType));
|
"\n", function[0].Data.iLevel, channel.wChannel, channel.dwType));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -134,8 +134,8 @@ echo_channel_set_mix(void *card, MIXER_AUDIO_CHANNEL channel, int32 type, float
|
|||||||
dev->pEG->ProcessMixerMultiFunction(multi_function, size);
|
dev->pEG->ProcessMixerMultiFunction(multi_function, size);
|
||||||
|
|
||||||
if (function[0].RtnStatus == ECHOSTATUS_OK) {
|
if (function[0].RtnStatus == ECHOSTATUS_OK) {
|
||||||
PRINT(("echo_channel_set_mix OK: %ld, %d, %ld\n", function[0].Data.iLevel,
|
PRINT(("echo_channel_set_mix OK: %" B_PRId32 ", %d, %" B_PRIu32 "\n",
|
||||||
channel.wChannel, channel.dwType));
|
function[0].Data.iLevel, channel.wChannel, channel.dwType));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -242,7 +242,7 @@ echo_create_controls_list(multi_dev *multi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
multi->control_count = index;
|
multi->control_count = index;
|
||||||
PRINT(("multi->control_count %lu\n", multi->control_count));
|
PRINT(("multi->control_count %" B_PRIu32 "\n", multi->control_count));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,7 +256,8 @@ echo_get_mix(echo_dev *card, multi_mix_value_info * mmvi)
|
|||||||
for (i = 0; i < mmvi->item_count; i++) {
|
for (i = 0; i < mmvi->item_count; i++) {
|
||||||
id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;
|
id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;
|
||||||
if (id < 0 || id >= card->multi.control_count) {
|
if (id < 0 || id >= card->multi.control_count) {
|
||||||
PRINT(("echo_get_mix : invalid control id requested : %li\n", id));
|
PRINT(("echo_get_mix : invalid control id requested : %" B_PRIu32
|
||||||
|
"\n", id));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
control = &card->multi.controls[id];
|
control = &card->multi.controls[id];
|
||||||
@@ -297,7 +298,8 @@ echo_set_mix(echo_dev *card, multi_mix_value_info * mmvi)
|
|||||||
for (i = 0; i < mmvi->item_count; i++) {
|
for (i = 0; i < mmvi->item_count; i++) {
|
||||||
id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;
|
id = mmvi->values[i].id - MULTI_CONTROL_FIRSTID;
|
||||||
if (id < 0 || id >= card->multi.control_count) {
|
if (id < 0 || id >= card->multi.control_count) {
|
||||||
PRINT(("echo_set_mix : invalid control id requested : %li\n", id));
|
PRINT(("echo_set_mix : invalid control id requested : %" B_PRIu32
|
||||||
|
"\n", id));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
control = &card->multi.controls[id];
|
control = &card->multi.controls[id];
|
||||||
@@ -307,7 +309,8 @@ echo_set_mix(echo_dev *card, multi_mix_value_info * mmvi)
|
|||||||
if (i + 1 < mmvi->item_count) {
|
if (i + 1 < mmvi->item_count) {
|
||||||
id = mmvi->values[i + 1].id - MULTI_CONTROL_FIRSTID;
|
id = mmvi->values[i + 1].id - MULTI_CONTROL_FIRSTID;
|
||||||
if (id < 0 || id >= card->multi.control_count) {
|
if (id < 0 || id >= card->multi.control_count) {
|
||||||
PRINT(("echo_set_mix : invalid control id requested : %li\n", id));
|
PRINT(("echo_set_mix : invalid control id requested : %"
|
||||||
|
B_PRIu32 "\n", id));
|
||||||
} else {
|
} else {
|
||||||
control2 = &card->multi.controls[id];
|
control2 = &card->multi.controls[id];
|
||||||
if (control2->mix_control.master != control->mix_control.id)
|
if (control2->mix_control.master != control->mix_control.id)
|
||||||
@@ -995,21 +998,21 @@ echo_open(const char *name, uint32 flags, void** cookie)
|
|||||||
value = strtoul (item, &end, 0);
|
value = strtoul (item, &end, 0);
|
||||||
if (*end == '\0') current_settings.sample_rate = value;
|
if (*end == '\0') current_settings.sample_rate = value;
|
||||||
}
|
}
|
||||||
PRINT(("sample_rate %lu\n", current_settings.sample_rate));
|
PRINT(("sample_rate %" B_PRIu32 "\n", current_settings.sample_rate));
|
||||||
|
|
||||||
item = get_driver_parameter (settings_handle, "buffer_frames", NULL, NULL);
|
item = get_driver_parameter (settings_handle, "buffer_frames", NULL, NULL);
|
||||||
if (item) {
|
if (item) {
|
||||||
value = strtoul (item, &end, 0);
|
value = strtoul (item, &end, 0);
|
||||||
if (*end == '\0') current_settings.buffer_frames = value;
|
if (*end == '\0') current_settings.buffer_frames = value;
|
||||||
}
|
}
|
||||||
PRINT(("buffer_frames %lu\n", current_settings.buffer_frames));
|
PRINT(("buffer_frames %" B_PRIu32 "\n", current_settings.buffer_frames));
|
||||||
|
|
||||||
item = get_driver_parameter (settings_handle, "buffer_count", NULL, NULL);
|
item = get_driver_parameter (settings_handle, "buffer_count", NULL, NULL);
|
||||||
if (item) {
|
if (item) {
|
||||||
value = strtoul (item, &end, 0);
|
value = strtoul (item, &end, 0);
|
||||||
if (*end == '\0') current_settings.buffer_count = value;
|
if (*end == '\0') current_settings.buffer_count = value;
|
||||||
}
|
}
|
||||||
PRINT(("buffer_count %lu\n", current_settings.buffer_count));
|
PRINT(("buffer_count %" B_PRId32 "\n", current_settings.buffer_count));
|
||||||
|
|
||||||
unload_driver_settings (settings_handle);
|
unload_driver_settings (settings_handle);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user