opensound.media_addon: fixes 64 bit warnings
This commit is contained in:
@@ -364,8 +364,8 @@ status_t OpenSoundDevice::InitDriver()
|
|||||||
{
|
{
|
||||||
|
|
||||||
CALLED();
|
CALLED();
|
||||||
PRINT(("OpenSoundDevice::InitDriver: %ld engines, %ld mixers\n",
|
PRINT(("OpenSoundDevice::InitDriver: %" B_PRId32 " engines, %" B_PRId32
|
||||||
CountEngines(), CountMixers()));
|
" mixers\n", CountEngines(), CountMixers()));
|
||||||
|
|
||||||
if (CountMixers()) {
|
if (CountMixers()) {
|
||||||
;//...
|
;//...
|
||||||
|
|||||||
@@ -540,7 +540,8 @@ status_t OpenSoundDeviceEngine::AcceptFormatFor(int fmt, media_format &format, b
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("%s:step1 fmt=0x%08x, raw.format=0x%08lx\n", __FUNCTION__, fmt, raw.format));
|
PRINT(("%s:step1 fmt=0x%08x, raw.format=0x%08" B_PRIx32 "\n",
|
||||||
|
__FUNCTION__, fmt, raw.format));
|
||||||
// if specified, try it
|
// if specified, try it
|
||||||
if (raw.format)
|
if (raw.format)
|
||||||
afmt = OpenSoundDevice::convert_media_format_to_oss_format(raw.format);
|
afmt = OpenSoundDevice::convert_media_format_to_oss_format(raw.format);
|
||||||
@@ -556,7 +557,8 @@ status_t OpenSoundDeviceEngine::AcceptFormatFor(int fmt, media_format &format, b
|
|||||||
PRINT(("%s:step3 afmt=0x%08x\n", __FUNCTION__, afmt));
|
PRINT(("%s:step3 afmt=0x%08x\n", __FUNCTION__, afmt));
|
||||||
// convert back
|
// convert back
|
||||||
raw.format = OpenSoundDevice::convert_oss_format_to_media_format(afmt);
|
raw.format = OpenSoundDevice::convert_oss_format_to_media_format(afmt);
|
||||||
PRINT(("%s:step4 afmt=0x%08x, raw.format=0x%08lx\n", __FUNCTION__, afmt, raw.format));
|
PRINT(("%s:step4 afmt=0x%08x, raw.format=0x%08" B_PRIx32 "\n",
|
||||||
|
__FUNCTION__, afmt, raw.format));
|
||||||
raw.valid_bits = OpenSoundDevice::convert_oss_format_to_valid_bits(afmt);
|
raw.valid_bits = OpenSoundDevice::convert_oss_format_to_valid_bits(afmt);
|
||||||
|
|
||||||
err = SetFormat(afmt);
|
err = SetFormat(afmt);
|
||||||
@@ -634,7 +636,8 @@ status_t OpenSoundDeviceEngine::SpecializeFormatFor(int fmt, media_format &forma
|
|||||||
if (format.type == B_MEDIA_RAW_AUDIO) {
|
if (format.type == B_MEDIA_RAW_AUDIO) {
|
||||||
media_multi_audio_format &raw = format.u.raw_audio;
|
media_multi_audio_format &raw = format.u.raw_audio;
|
||||||
|
|
||||||
PRINT(("%s:step1 fmt=0x%08x, raw.format=0x%08lx\n", __FUNCTION__, fmt, raw.format));
|
PRINT(("%s:step1 fmt=0x%08x, raw.format=0x%08" B_PRIx32 "\n",
|
||||||
|
__FUNCTION__, fmt, raw.format));
|
||||||
// select the best as default
|
// select the best as default
|
||||||
if (!raw.format) {
|
if (!raw.format) {
|
||||||
afmt = OpenSoundDevice::select_oss_format(fmt);
|
afmt = OpenSoundDevice::select_oss_format(fmt);
|
||||||
@@ -651,7 +654,8 @@ status_t OpenSoundDeviceEngine::SpecializeFormatFor(int fmt, media_format &forma
|
|||||||
}
|
}
|
||||||
// convert back
|
// convert back
|
||||||
raw.format = OpenSoundDevice::convert_oss_format_to_media_format(afmt);
|
raw.format = OpenSoundDevice::convert_oss_format_to_media_format(afmt);
|
||||||
PRINT(("%s:step4 afmt=0x%08x, raw.format=0x%08lx\n", __FUNCTION__, afmt, raw.format));
|
PRINT(("%s:step4 afmt=0x%08x, raw.format=0x%08" B_PRIx32 "\n",
|
||||||
|
__FUNCTION__, afmt, raw.format));
|
||||||
if (!raw.valid_bits)
|
if (!raw.valid_bits)
|
||||||
raw.valid_bits = OpenSoundDevice::convert_oss_format_to_valid_bits(afmt);
|
raw.valid_bits = OpenSoundDevice::convert_oss_format_to_valid_bits(afmt);
|
||||||
if (raw.valid_bits != OpenSoundDevice::convert_oss_format_to_valid_bits(afmt)) {
|
if (raw.valid_bits != OpenSoundDevice::convert_oss_format_to_valid_bits(afmt)) {
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public:
|
|||||||
|
|
||||||
// make sure all buffers are recycled, or we might hang
|
// make sure all buffers are recycled, or we might hang
|
||||||
// when told to quit
|
// when told to quit
|
||||||
while (BBuffer* buffer = (BBuffer*)fBuffers.RemoveItem(0L))
|
while (BBuffer* buffer = (BBuffer*)fBuffers.RemoveItem((int32)0))
|
||||||
buffer->Recycle();
|
buffer->Recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ OpenSoundNode::OpenSoundNode(BMediaAddOn* addon, const char* name,
|
|||||||
fTimeSourceStartTime(0),
|
fTimeSourceStartTime(0),
|
||||||
|
|
||||||
fWeb(NULL),
|
fWeb(NULL),
|
||||||
fConfig(0UL)
|
fConfig((uint32)0)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
@@ -488,7 +488,7 @@ OpenSoundNode::NodeRegistered()
|
|||||||
const char *prefix = "";
|
const char *prefix = "";
|
||||||
if (strstr(engine->Info()->name, "SPDIF"))
|
if (strstr(engine->Info()->name, "SPDIF"))
|
||||||
prefix = "S/PDIF ";
|
prefix = "S/PDIF ";
|
||||||
sprintf(mediaInput.name, "%sOutput %ld (%s)", prefix,
|
sprintf(mediaInput.name, "%sOutput %" B_PRId32 " (%s)", prefix,
|
||||||
mediaInput.destination.id, gSupportedFormatsNames[f]);
|
mediaInput.destination.id, gSupportedFormatsNames[f]);
|
||||||
|
|
||||||
NodeInput* input = new (nothrow) NodeInput(mediaInput, i, fmt,
|
NodeInput* input = new (nothrow) NodeInput(mediaInput, i, fmt,
|
||||||
@@ -536,7 +536,7 @@ OpenSoundNode::NodeRegistered()
|
|||||||
const char *prefix = "";
|
const char *prefix = "";
|
||||||
if (strstr(engine->Info()->name, "SPDIF"))
|
if (strstr(engine->Info()->name, "SPDIF"))
|
||||||
prefix = "S/PDIF ";
|
prefix = "S/PDIF ";
|
||||||
sprintf(mediaOutput.name, "%sInput %ld (%s)", prefix,
|
sprintf(mediaOutput.name, "%sInput %" B_PRId32 " (%s)", prefix,
|
||||||
mediaOutput.source.id, gSupportedFormatsNames[f]);
|
mediaOutput.source.id, gSupportedFormatsNames[f]);
|
||||||
|
|
||||||
NodeOutput* output = new (nothrow) NodeOutput(mediaOutput,
|
NodeOutput* output = new (nothrow) NodeOutput(mediaOutput,
|
||||||
@@ -1282,8 +1282,9 @@ OpenSoundNode::Disconnect(const media_source& what,
|
|||||||
channel->FreeBuffers();
|
channel->FreeBuffers();
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "\tDisconnect() called with wrong source/destination "
|
fprintf(stderr, "\tDisconnect() called with wrong source/destination "
|
||||||
"(%ld/%ld), ours is (%ld/%ld)\n", what.id, where.id,
|
"(%" B_PRId32 "/%" B_PRId32 "), ours is (%" B_PRId32 "/%" B_PRId32
|
||||||
channel->fOutput.source.id, channel->fOutput.destination.id);
|
")\n", what.id, where.id, channel->fOutput.source.id,
|
||||||
|
channel->fOutput.destination.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1315,7 +1316,7 @@ OpenSoundNode::LateNoticeReceived(const media_source& what, bigtime_t how_much,
|
|||||||
fInternalLatency += how_much;
|
fInternalLatency += how_much;
|
||||||
SetEventLatency(fLatency + fInternalLatency);
|
SetEventLatency(fLatency + fInternalLatency);
|
||||||
|
|
||||||
fprintf(stderr, "\tincreasing latency to %Ld\n",
|
fprintf(stderr, "\tincreasing latency to %" B_PRIdBIGTIME "\n",
|
||||||
fLatency + fInternalLatency);
|
fLatency + fInternalLatency);
|
||||||
} else {
|
} else {
|
||||||
// The other run modes dictate various strategies for sacrificing data
|
// The other run modes dictate various strategies for sacrificing data
|
||||||
@@ -1396,7 +1397,8 @@ OpenSoundNode::HandleEvent(const media_timed_event* event, bigtime_t lateness,
|
|||||||
HandleParameter(event,lateness,realTimeEvent);
|
HandleParameter(event,lateness,realTimeEvent);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr," unknown event type: %li\n",event->type);
|
fprintf(stderr," unknown event type: %" B_PRId32 "\n",
|
||||||
|
event->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1448,7 +1450,7 @@ OpenSoundNode::HandleBuffer(const media_timed_event* event,
|
|||||||
// TODO: Debug
|
// TODO: Debug
|
||||||
//mLateBuffers++;
|
//mLateBuffers++;
|
||||||
NotifyLateProducer(channel->fInput.source, -how_early, perf_time);
|
NotifyLateProducer(channel->fInput.source, -how_early, perf_time);
|
||||||
fprintf(stderr," <- LATE BUFFER : %lli\n", how_early);
|
fprintf(stderr," <- LATE BUFFER : %" B_PRIdBIGTIME "\n", how_early);
|
||||||
buffer->Recycle();
|
buffer->Recycle();
|
||||||
} else {
|
} else {
|
||||||
fDevice->Locker()->Lock();
|
fDevice->Locker()->Lock();
|
||||||
@@ -1610,8 +1612,8 @@ OpenSoundNode::TimeSourceOp(const time_source_op_info& op, void* _reserved)
|
|||||||
break;
|
break;
|
||||||
case B_TIMESOURCE_SEEK:
|
case B_TIMESOURCE_SEEK:
|
||||||
// TRACE("TimeSourceOp op B_TIMESOURCE_SEEK\n");
|
// TRACE("TimeSourceOp op B_TIMESOURCE_SEEK\n");
|
||||||
printf("TimeSourceOp op B_TIMESOURCE_SEEK, real %lld, "
|
printf("TimeSourceOp op B_TIMESOURCE_SEEK, real %" B_PRIdBIGTIME ", "
|
||||||
"perf %lld\n", op.real_time, op.performance_time);
|
"perf %" B_PRIdBIGTIME "\n", op.real_time, op.performance_time);
|
||||||
BroadcastTimeWarp(op.real_time, op.performance_time);
|
BroadcastTimeWarp(op.real_time, op.performance_time);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -2257,7 +2259,7 @@ OpenSoundNode::_PlayThread(NodeInput* input)
|
|||||||
TRACE("OpenSoundNode::_PlayThread: buffers: %ld\n",
|
TRACE("OpenSoundNode::_PlayThread: buffers: %ld\n",
|
||||||
input->fBuffers.CountItems());
|
input->fBuffers.CountItems());
|
||||||
|
|
||||||
BBuffer* buffer = (BBuffer*)input->fBuffers.RemoveItem(0L);
|
BBuffer* buffer = (BBuffer*)input->fBuffers.RemoveItem((int32)0);
|
||||||
|
|
||||||
fDevice->Locker()->Unlock();
|
fDevice->Locker()->Unlock();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user