USB audio: Fix building on x86_64
* fix x86_64 build errors and warnings pointed out by Diver; * fix warning building with gcc2.
This commit is contained in:
parent
03891f74db
commit
222b10cbc0
@ -254,7 +254,7 @@ publish_devices()
|
||||
MutexLocker driverLock;
|
||||
|
||||
int32 deviceCount = 0;
|
||||
for (int32 i = 0; i < MAX_DEVICES; i++) {
|
||||
for (size_t i = 0; i < MAX_DEVICES; i++) {
|
||||
if (gDevices[i] == NULL)
|
||||
continue;
|
||||
|
||||
|
@ -117,7 +117,7 @@ Stream::_ChooseAlternate()
|
||||
== USB_ENDPOINT_ADDR_DIR_IN;
|
||||
|
||||
if (fIsInput)
|
||||
fCurrentBuffer = -1;
|
||||
fCurrentBuffer = (size_t)-1;
|
||||
|
||||
TRACE(INF, "Alternate %d EP:%x selected for %s!\n",
|
||||
fActiveAlternate, endpoint->fEndpointAddress,
|
||||
@ -306,8 +306,8 @@ Stream::_QueueNextTransfer(size_t queuedBuffer, bool start)
|
||||
|
||||
|
||||
void
|
||||
Stream::_TransferCallback(void* cookie, int32 status, void* data,
|
||||
uint32 actualLength)
|
||||
Stream::_TransferCallback(void* cookie, status_t status, void* data,
|
||||
size_t actualLength)
|
||||
{
|
||||
Stream* stream = (Stream*)cookie;
|
||||
atomic_add(&stream->fInsideNotify, 1);
|
||||
@ -371,10 +371,11 @@ Stream::SetEnabledChannels(uint32& offset, multi_channel_enable* Enable)
|
||||
if (cluster == 0)
|
||||
return B_ERROR;
|
||||
|
||||
for (size_t i = 0; i < cluster->ChannelsCount(); i++)
|
||||
for (size_t i = 0; i < cluster->ChannelsCount(); i++, offset++) {
|
||||
TRACE(INF, "%s channel %d.\n",
|
||||
(B_TEST_CHANNEL(Enable->enable_bits, offset++)
|
||||
(B_TEST_CHANNEL(Enable->enable_bits, offset)
|
||||
? "Enable" : "Disable"), offset + 1);
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
@ -64,8 +64,8 @@ private:
|
||||
status_t _ChooseAlternate();
|
||||
status_t _SetupBuffers();
|
||||
status_t _QueueNextTransfer(size_t buffer, bool start);
|
||||
static void _TransferCallback(void* cookie, int32 status,
|
||||
void* data, uint32 actualLength);
|
||||
static void _TransferCallback(void* cookie, status_t status,
|
||||
void* data, size_t actualLength);
|
||||
void _DumpDescriptors();
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user