Lots of B_PRI... insertions to fix errors with DEBUG=1.
This commit is contained in:
@@ -123,7 +123,7 @@ create_device(const usb_device* dev, uint16 ifno)
|
|||||||
{
|
{
|
||||||
int32 bc;
|
int32 bc;
|
||||||
get_sem_count(sem, &bc);
|
get_sem_count(sem, &bc);
|
||||||
DPRINTF_DEBUG((MY_ID "Allocated %ld write buffers\n", bc));
|
DPRINTF_DEBUG((MY_ID "Allocated %" B_PRId32 " write buffers\n", bc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -245,11 +245,11 @@ midi_usb_read_callback(void* cookie, status_t status,
|
|||||||
midiDevice->bus_status = status; /* B_USB_STATUS_* */
|
midiDevice->bus_status = status; /* B_USB_STATUS_* */
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
/* request failed */
|
/* request failed */
|
||||||
DPRINTF_DEBUG((MY_ID "bus status 0x%lx\n", status));
|
DPRINTF_DEBUG((MY_ID "bus status 0x%" B_PRIx32 "\n", status));
|
||||||
if (status == B_CANCELED || !midiDevice->active) {
|
if (status == B_CANCELED || !midiDevice->active) {
|
||||||
/* cancelled: device is unplugged */
|
/* cancelled: device is unplugged */
|
||||||
DPRINTF_DEBUG((MY_ID "midi_usb_read_callback: cancelled"
|
DPRINTF_DEBUG((MY_ID "midi_usb_read_callback: cancelled"
|
||||||
"(status=%lx active=%d -- deleting sem_cbs\n",
|
"(status=%" B_PRIx32 " active=%d -- deleting sem_cbs\n",
|
||||||
status, midiDevice->active));
|
status, midiDevice->active));
|
||||||
|
|
||||||
// Free any read() still blocked on semaphore
|
// Free any read() still blocked on semaphore
|
||||||
@@ -294,7 +294,7 @@ midi_usb_write_callback(void* cookie, status_t status,
|
|||||||
|
|
||||||
assert(cookie != NULL);
|
assert(cookie != NULL);
|
||||||
DPRINTF_DEBUG((MY_ID "midi_usb_write_callback()"
|
DPRINTF_DEBUG((MY_ID "midi_usb_write_callback()"
|
||||||
" status %ld length %ld pkt %p cin %x\n",
|
" status %" B_PRId32 " length %" B_PRIuSIZE " pkt %p cin %x\n",
|
||||||
status, actual_len, pkt, pkt->cin));
|
status, actual_len, pkt, pkt->cin));
|
||||||
release_sem(midiDevice->sem_send); /* done with buffer */
|
release_sem(midiDevice->sem_send); /* done with buffer */
|
||||||
}
|
}
|
||||||
@@ -561,8 +561,8 @@ usb_midi_read(driver_cookie* cookie, off_t position,
|
|||||||
if (midiDevice == NULL || !midiDevice->active)
|
if (midiDevice == NULL || !midiDevice->active)
|
||||||
return B_ERROR; /* already unplugged */
|
return B_ERROR; /* already unplugged */
|
||||||
|
|
||||||
DPRINTF_DEBUG((MY_ID "usb_midi_read: (%ld byte buffer at %lld cookie %p)"
|
DPRINTF_DEBUG((MY_ID "usb_midi_read: (%" B_PRIuSIZE " byte buffer at %"
|
||||||
"\n", *num_bytes, position, cookie));
|
B_PRIdOFF " cookie %p)\n", *num_bytes, position, cookie));
|
||||||
while (midiDevice && midiDevice->active) {
|
while (midiDevice && midiDevice->active) {
|
||||||
ZDPRINTF_DEBUG((MY_ID "waiting on acquire_sem_etc\n"));
|
ZDPRINTF_DEBUG((MY_ID "waiting on acquire_sem_etc\n"));
|
||||||
err = acquire_sem_etc(cookie->sem_cb, 1,
|
err = acquire_sem_etc(cookie->sem_cb, 1,
|
||||||
@@ -633,8 +633,8 @@ usb_midi_write(driver_cookie* cookie, off_t position,
|
|||||||
buff_lim = midiDevice->outMaxPkt * 3 / 4;
|
buff_lim = midiDevice->outMaxPkt * 3 / 4;
|
||||||
/* max MIDI bytes buffer space */
|
/* max MIDI bytes buffer space */
|
||||||
|
|
||||||
DPRINTF_DEBUG((MY_ID "MIDI write (%ld bytes at %lld)\n",
|
DPRINTF_DEBUG((MY_ID "MIDI write (%" B_PRIuSIZE " bytes at %" B_PRIdOFF
|
||||||
*num_bytes, position));
|
")\n", *num_bytes, position));
|
||||||
if (*num_bytes > 3 && midicode != 0xF0) {
|
if (*num_bytes > 3 && midicode != 0xF0) {
|
||||||
DPRINTF_ERR((MY_ID "Non-SysEx packet of %ld bytes"
|
DPRINTF_ERR((MY_ID "Non-SysEx packet of %ld bytes"
|
||||||
" -- too big to handle\n", *num_bytes));
|
" -- too big to handle\n", *num_bytes));
|
||||||
|
|||||||
@@ -1679,7 +1679,7 @@ BPlusTree::Insert(Transaction& transaction, const uint8* key, uint16 keyLength,
|
|||||||
RETURN_ERROR(B_BAD_VALUE);
|
RETURN_ERROR(B_BAD_VALUE);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (value < 0)
|
if (value < 0)
|
||||||
panic("tried to insert invalid value %Ld!\n", value);
|
panic("tried to insert invalid value %" B_PRId64 "!\n", value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ASSERT_WRITE_LOCKED_INODE(fStream);
|
ASSERT_WRITE_LOCKED_INODE(fStream);
|
||||||
@@ -2878,9 +2878,9 @@ TreeIterator::Dump()
|
|||||||
{
|
{
|
||||||
__out("TreeIterator at %p:\n", this);
|
__out("TreeIterator at %p:\n", this);
|
||||||
__out("\tfTree = %p\n", fTree);
|
__out("\tfTree = %p\n", fTree);
|
||||||
__out("\tfCurrentNodeOffset = %Ld\n", fCurrentNodeOffset);
|
__out("\tfCurrentNodeOffset = %" B_PRId64 "\n", fCurrentNodeOffset);
|
||||||
__out("\tfCurrentKey = %d\n", (int)fCurrentKey);
|
__out("\tfCurrentKey = %d\n", (int)fCurrentKey);
|
||||||
__out("\tfDuplicateNode = %Ld (%Ld, 0x%Lx)\n",
|
__out("\tfDuplicateNode = %" B_PRId64 " (%" B_PRId64 ", 0x%" B_PRIx64 ")\n",
|
||||||
bplustree_node::FragmentOffset(fDuplicateNode), fDuplicateNode,
|
bplustree_node::FragmentOffset(fDuplicateNode), fDuplicateNode,
|
||||||
fDuplicateNode);
|
fDuplicateNode);
|
||||||
__out("\tfDuplicate = %u\n", fDuplicate);
|
__out("\tfDuplicate = %u\n", fDuplicate);
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ static status_t
|
|||||||
packagefs_mount(fs_volume* fsVolume, const char* device, uint32 flags,
|
packagefs_mount(fs_volume* fsVolume, const char* device, uint32 flags,
|
||||||
const char* parameters, ino_t* _rootID)
|
const char* parameters, ino_t* _rootID)
|
||||||
{
|
{
|
||||||
FUNCTION("fsVolume: %p, device: \"%s\", flags: %#lx, parameters: \"%s\"\n",
|
FUNCTION("fsVolume: %p, device: \"%s\", flags: %#" B_PRIx32 ", parameters: "
|
||||||
fsVolume, device, flags, parameters);
|
"\"%s\"\n", fsVolume, device, flags, parameters);
|
||||||
|
|
||||||
// create a Volume object
|
// create a Volume object
|
||||||
Volume* volume = new(std::nothrow) Volume(fsVolume);
|
Volume* volume = new(std::nothrow) Volume(fsVolume);
|
||||||
@@ -161,8 +161,8 @@ packagefs_lookup(fs_volume* fsVolume, fs_vnode* fsDir, const char* entryName,
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* dir = (Node*)fsDir->private_node;
|
Node* dir = (Node*)fsDir->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, dir: %p (%lld), entry: \"%s\"\n", volume, dir,
|
FUNCTION("volume: %p, dir: %p (%" B_PRId64 "), entry: \"%s\"\n", volume,
|
||||||
dir->ID(), entryName);
|
dir, dir->ID(), entryName);
|
||||||
|
|
||||||
if (!S_ISDIR(dir->Mode()))
|
if (!S_ISDIR(dir->Mode()))
|
||||||
return B_NOT_A_DIRECTORY;
|
return B_NOT_A_DIRECTORY;
|
||||||
@@ -218,7 +218,7 @@ packagefs_get_vnode(fs_volume* fsVolume, ino_t vnid, fs_vnode* fsNode,
|
|||||||
{
|
{
|
||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
|
|
||||||
FUNCTION("volume: %p, vnid: %lld\n", volume, vnid);
|
FUNCTION("volume: %p, vnid: %" B_PRId64 "\n", volume, vnid);
|
||||||
|
|
||||||
VolumeReadLocker volumeLocker(volume);
|
VolumeReadLocker volumeLocker(volume);
|
||||||
Node* node = volume->FindNode(vnid);
|
Node* node = volume->FindNode(vnid);
|
||||||
@@ -271,8 +271,8 @@ packagefs_io(fs_volume* fsVolume, fs_vnode* fsNode, void* cookie,
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p, request: %p\n", volume,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p, request: %p\n",
|
||||||
node, node->ID(), cookie, request);
|
volume, node, node->ID(), cookie, request);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
if (io_request_is_write(request))
|
if (io_request_is_write(request))
|
||||||
@@ -294,8 +294,8 @@ packagefs_ioctl(fs_volume* fsVolume, fs_vnode* fsNode, void* cookie,
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p, operation: %" B_PRIu32
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p, operation: %"
|
||||||
", buffer: %p, size: %zu\n", volume, node, node->ID(), cookie,
|
B_PRIu32 ", buffer: %p, size: %zu\n", volume, node, node->ID(), cookie,
|
||||||
operation, buffer, size);
|
operation, buffer, size);
|
||||||
TOUCH(cookie);
|
TOUCH(cookie);
|
||||||
|
|
||||||
@@ -310,7 +310,8 @@ packagefs_read_symlink(fs_volume* fsVolume, fs_vnode* fsNode, char* buffer,
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID());
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node,
|
||||||
|
node->ID());
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
NodeReadLocker nodeLocker(node);
|
NodeReadLocker nodeLocker(node);
|
||||||
@@ -328,7 +329,8 @@ packagefs_access(fs_volume* fsVolume, fs_vnode* fsNode, int mode)
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID());
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node,
|
||||||
|
node->ID());
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
NodeReadLocker nodeLocker(node);
|
NodeReadLocker nodeLocker(node);
|
||||||
@@ -342,7 +344,8 @@ packagefs_read_stat(fs_volume* fsVolume, fs_vnode* fsNode, struct stat* st)
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID());
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node,
|
||||||
|
node->ID());
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
NodeReadLocker nodeLocker(node);
|
NodeReadLocker nodeLocker(node);
|
||||||
@@ -385,8 +388,8 @@ packagefs_open(fs_volume* fsVolume, fs_vnode* fsNode, int openMode,
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), openMode %#x\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), openMode %#x\n",
|
||||||
node->ID(), openMode);
|
volume, node, node->ID(), openMode);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
NodeReadLocker nodeLocker(node);
|
NodeReadLocker nodeLocker(node);
|
||||||
@@ -427,7 +430,7 @@ packagefs_free_cookie(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie)
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
FileCookie* cookie = (FileCookie*)_cookie;
|
FileCookie* cookie = (FileCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -446,9 +449,9 @@ packagefs_read(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie,
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
FileCookie* cookie = (FileCookie*)_cookie;
|
FileCookie* cookie = (FileCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p, offset: %lld, "
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p, offset: %"
|
||||||
"buffer: %p, size: %lu\n", volume, node, node->ID(), cookie, offset,
|
B_PRId64 ", buffer: %p, size: %" B_PRIuSIZE "\n", volume, node,
|
||||||
buffer, *bufferSize);
|
node->ID(), cookie, offset, buffer, *bufferSize);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
if ((cookie->openMode & O_RWMASK) != O_RDONLY)
|
if ((cookie->openMode & O_RWMASK) != O_RDONLY)
|
||||||
@@ -549,7 +552,8 @@ packagefs_open_dir(fs_volume* fsVolume, fs_vnode* fsNode, void** _cookie)
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID());
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node,
|
||||||
|
node->ID());
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
if (!S_ISDIR(node->Mode()))
|
if (!S_ISDIR(node->Mode()))
|
||||||
@@ -586,7 +590,7 @@ packagefs_free_dir_cookie(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie)
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
DirectoryCookie* cookie = (DirectoryCookie*)_cookie;
|
DirectoryCookie* cookie = (DirectoryCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -606,7 +610,7 @@ packagefs_read_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie,
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
DirectoryCookie* cookie = (DirectoryCookie*)_cookie;
|
DirectoryCookie* cookie = (DirectoryCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -670,7 +674,7 @@ packagefs_rewind_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie)
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
DirectoryCookie* cookie = (DirectoryCookie*)_cookie;
|
DirectoryCookie* cookie = (DirectoryCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -691,7 +695,8 @@ packagefs_open_attr_dir(fs_volume* fsVolume, fs_vnode* fsNode, void** _cookie)
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld)\n", volume, node, node->ID());
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 ")\n", volume, node,
|
||||||
|
node->ID());
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
status_t error = check_access(node, R_OK);
|
status_t error = check_access(node, R_OK);
|
||||||
@@ -726,7 +731,7 @@ packagefs_free_attr_dir_cookie(fs_volume* fsVolume, fs_vnode* fsNode,
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie;
|
AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -745,7 +750,7 @@ packagefs_read_attr_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie,
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie;
|
AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -761,7 +766,7 @@ packagefs_rewind_attr_dir(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie)
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie;
|
AttributeDirectoryCookie* cookie = (AttributeDirectoryCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -780,8 +785,8 @@ packagefs_open_attr(fs_volume* fsVolume, fs_vnode* fsNode, const char* name,
|
|||||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), name: \"%s\", openMode %#x\n",
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), name: \"%s\", openMode "
|
||||||
volume, node, node->ID(), name, openMode);
|
"%#x\n", volume, node, node->ID(), name, openMode);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
|
|
||||||
NodeReadLocker nodeLocker(node);
|
NodeReadLocker nodeLocker(node);
|
||||||
@@ -819,7 +824,7 @@ packagefs_free_attr_cookie(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie)
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
AttributeCookie* cookie = (AttributeCookie*)_cookie;
|
AttributeCookie* cookie = (AttributeCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -838,7 +843,7 @@ packagefs_read_attr(fs_volume* fsVolume, fs_vnode* fsNode, void* _cookie,
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
AttributeCookie* cookie = (AttributeCookie*)_cookie;
|
AttributeCookie* cookie = (AttributeCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
@@ -855,7 +860,7 @@ packagefs_read_attr_stat(fs_volume* fsVolume, fs_vnode* fsNode,
|
|||||||
Node* node = (Node*)fsNode->private_node;
|
Node* node = (Node*)fsNode->private_node;
|
||||||
AttributeCookie* cookie = (AttributeCookie*)_cookie;
|
AttributeCookie* cookie = (AttributeCookie*)_cookie;
|
||||||
|
|
||||||
FUNCTION("volume: %p, node: %p (%lld), cookie: %p\n", volume, node,
|
FUNCTION("volume: %p, node: %p (%" B_PRId64 "), cookie: %p\n", volume, node,
|
||||||
node->ID(), cookie);
|
node->ID(), cookie);
|
||||||
TOUCH(volume);
|
TOUCH(volume);
|
||||||
TOUCH(node);
|
TOUCH(node);
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define REPORT_ERROR(error) { \
|
#define REPORT_ERROR(error) { \
|
||||||
LPRINT(("returning error 0x%lx, `%s'\n", error, strerror(error))); \
|
LPRINT(("returning error 0x%" B_PRIx32 ", `%s'\n", error, strerror(error))); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RETURN_ERROR(error) { \
|
#define RETURN_ERROR(error) { \
|
||||||
@@ -190,7 +190,7 @@ private:
|
|||||||
} else if (_status == (status_t)B_OK) { \
|
} else if (_status == (status_t)B_OK) { \
|
||||||
LPRINT(("returning B_OK\n")); \
|
LPRINT(("returning B_OK\n")); \
|
||||||
} else { \
|
} else { \
|
||||||
LPRINT(("returning 0x%lx = %ld\n", _status, _status)); \
|
LPRINT(("returning 0x%" B_PRIx32 " = %" B_PRId32 "\n", _status, _status)); \
|
||||||
} \
|
} \
|
||||||
return _status; \
|
return _status; \
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ dump_full_table_of_contents(uchar* data, uint16 dataLength)
|
|||||||
TRACE((" pminutes = %d\n", entries[i].pminutes));
|
TRACE((" pminutes = %d\n", entries[i].pminutes));
|
||||||
TRACE((" pseconds = %d\n", entries[i].pseconds));
|
TRACE((" pseconds = %d\n", entries[i].pseconds));
|
||||||
TRACE((" pframes = %d\n", entries[i].pframes));
|
TRACE((" pframes = %d\n", entries[i].pframes));
|
||||||
TRACE((" lba = %lld\n",
|
TRACE((" lba = %" B_PRId64 "\n",
|
||||||
msf_to_lba(make_msf_address(entries[i].pminutes,
|
msf_to_lba(make_msf_address(entries[i].pminutes,
|
||||||
entries[i].pseconds, entries[i].pframes))));
|
entries[i].pseconds, entries[i].pframes))));
|
||||||
}
|
}
|
||||||
@@ -286,8 +286,8 @@ read_table_of_contents(int deviceFD, uint32 first_session, uchar* buffer,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
error = errno;
|
error = errno;
|
||||||
TRACE(("%s: scsi command failed with error 0x%lx\n", kModuleDebugName,
|
TRACE(("%s: scsi command failed with error 0x%" B_PRIx32 "\n",
|
||||||
error));
|
kModuleDebugName, error));
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
@@ -407,8 +407,8 @@ List::SortAndRemoveDuplicates()
|
|||||||
} else if (item->index == next->index) {
|
} else if (item->index == next->index) {
|
||||||
// Duplicate indicies
|
// Duplicate indicies
|
||||||
TRACE(("%s: List::SortAndRemoveDuplicates: duplicate indicies "
|
TRACE(("%s: List::SortAndRemoveDuplicates: duplicate indicies "
|
||||||
"found (#%ld); keeping first instance\n", kModuleDebugName,
|
"found (#%" B_PRId32 "); keeping first instance\n",
|
||||||
item->index));
|
kModuleDebugName, item->index));
|
||||||
item->next = next->next;
|
item->next = next->next;
|
||||||
delete next;
|
delete next;
|
||||||
next = item->next;
|
next = item->next;
|
||||||
@@ -563,7 +563,8 @@ Disc::Disc(int fd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("Setting init status to 0x%lx, `%s'\n", error, strerror(error)));
|
PRINT(("Setting init status to 0x%" B_PRIx32 ", `%s'\n", error,
|
||||||
|
strerror(error)));
|
||||||
fInitStatus = error;
|
fInitStatus = error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -594,7 +595,7 @@ Disc::InitCheck()
|
|||||||
Session*
|
Session*
|
||||||
Disc::GetSession(int32 index)
|
Disc::GetSession(int32 index)
|
||||||
{
|
{
|
||||||
DEBUG_INIT_ETC("Disc", ("index: %ld", index));
|
DEBUG_INIT_ETC("Disc", ("index: %" B_PRId32, index));
|
||||||
int32 counter = -1;
|
int32 counter = -1;
|
||||||
for (session* session = (struct session*)fSessionList->First(); session;
|
for (session* session = (struct session*)fSessionList->First(); session;
|
||||||
session = (struct session*)session->next) {
|
session = (struct session*)session->next) {
|
||||||
@@ -606,7 +607,8 @@ Disc::GetSession(int32 index)
|
|||||||
// track with the end of session.
|
// track with the end of session.
|
||||||
track* track = (struct track*)session->track_list.First();
|
track* track = (struct track*)session->track_list.First();
|
||||||
if (track != NULL) {
|
if (track != NULL) {
|
||||||
PRINT(("found session #%ld info (audio session)\n", index));
|
PRINT(("found session #%" B_PRId32 " info (audio session)"
|
||||||
|
"\n", index));
|
||||||
|
|
||||||
off_t startLBA = track->start_lba;
|
off_t startLBA = track->start_lba;
|
||||||
off_t endLBA = session->end_lba;
|
off_t endLBA = session->end_lba;
|
||||||
@@ -623,8 +625,8 @@ Disc::GetSession(int32 index)
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
PRINT(("Error: session #%ld is an audio session with no "
|
PRINT(("Error: session #%" B_PRId32 " is an audio session "
|
||||||
"tracks!\n", index));
|
"with no tracks!\n", index));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -633,13 +635,14 @@ Disc::GetSession(int32 index)
|
|||||||
track; track = (struct track*)track->next) {
|
track; track = (struct track*)track->next) {
|
||||||
counter++;
|
counter++;
|
||||||
if (counter == index) {
|
if (counter == index) {
|
||||||
PRINT(("found session #%ld info (data session)\n", index));
|
PRINT(("found session #%" B_PRId32 " info (data session)\n",
|
||||||
|
index));
|
||||||
|
|
||||||
off_t startLBA = track->start_lba;
|
off_t startLBA = track->start_lba;
|
||||||
if (startLBA < 0) {
|
if (startLBA < 0) {
|
||||||
WARN(("%s: warning: invalid negative start LBA of %lld"
|
WARN(("%s: warning: invalid negative start LBA of %"
|
||||||
" for data track assuming 0\n", kModuleDebugName,
|
B_PRId64 " for data track assuming 0\n",
|
||||||
startLBA));
|
kModuleDebugName, startLBA));
|
||||||
startLBA = 0;
|
startLBA = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -663,7 +666,7 @@ Disc::GetSession(int32 index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("no session #%ld found!\n", index));
|
PRINT(("no session #%" B_PRId32 " found!\n", index));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -676,10 +679,10 @@ Disc::Dump()
|
|||||||
TRACE(("%s: Disc dump:\n", kModuleDebugName));
|
TRACE(("%s: Disc dump:\n", kModuleDebugName));
|
||||||
session* session = (struct session*)fSessionList->First();
|
session* session = (struct session*)fSessionList->First();
|
||||||
while (session != NULL) {
|
while (session != NULL) {
|
||||||
TRACE(("session %ld:\n", session->index));
|
TRACE(("session %" B_PRId32 ":\n", session->index));
|
||||||
TRACE((" first track hint: %d\n", session->first_track_hint));
|
TRACE((" first track hint: %d\n", session->first_track_hint));
|
||||||
TRACE((" last track hint: %d\n", session->last_track_hint));
|
TRACE((" last track hint: %d\n", session->last_track_hint));
|
||||||
TRACE((" end_lba: %lld\n", session->end_lba));
|
TRACE((" end_lba: %" B_PRId64 "\n", session->end_lba));
|
||||||
TRACE((" control: %d (%s session, copy %s)\n",
|
TRACE((" control: %d (%s session, copy %s)\n",
|
||||||
session->control, (session->control & kControlDataTrack
|
session->control, (session->control & kControlDataTrack
|
||||||
? "data" : "audio"),
|
? "data" : "audio"),
|
||||||
@@ -688,8 +691,8 @@ Disc::Dump()
|
|||||||
TRACE((" adr: %d\n", session->adr));
|
TRACE((" adr: %d\n", session->adr));
|
||||||
track* track = (struct track*)session->track_list.First();
|
track* track = (struct track*)session->track_list.First();
|
||||||
while (track != NULL) {
|
while (track != NULL) {
|
||||||
TRACE((" track %ld:\n", track->index));
|
TRACE((" track %" B_PRId32 ":\n", track->index));
|
||||||
TRACE((" start_lba: %lld\n", track->start_lba));
|
TRACE((" start_lba: %" B_PRId64 "\n", track->start_lba));
|
||||||
track = (struct track*)track->next;
|
track = (struct track*)track->next;
|
||||||
}
|
}
|
||||||
session = (struct session*)session->next;
|
session = (struct session*)session->next;
|
||||||
@@ -790,7 +793,7 @@ status_t
|
|||||||
Disc::_ParseTableOfContents(cdrom_full_table_of_contents_entry entries[],
|
Disc::_ParseTableOfContents(cdrom_full_table_of_contents_entry entries[],
|
||||||
uint32 count)
|
uint32 count)
|
||||||
{
|
{
|
||||||
DEBUG_INIT_ETC("Disc", ("entries: %p, count: %ld", entries, count));
|
DEBUG_INIT_ETC("Disc", ("entries: %p, count: %" B_PRIu32, entries, count));
|
||||||
|
|
||||||
for (uint32 i = 0; i < count; i++) {
|
for (uint32 i = 0; i < count; i++) {
|
||||||
// Find or create the appropriate session
|
// Find or create the appropriate session
|
||||||
@@ -858,13 +861,13 @@ Disc::_ParseTableOfContents(cdrom_full_table_of_contents_entry entries[],
|
|||||||
session->control = entries[i].control;
|
session->control = entries[i].control;
|
||||||
session->adr = entries[i].adr;
|
session->adr = entries[i].adr;
|
||||||
} else {
|
} else {
|
||||||
WARN(("%s: warning: illegal end lba %lld found for "
|
WARN(("%s: warning: illegal end lba %" B_PRId64 " found"
|
||||||
"session %d\n", kModuleDebugName, endLBA,
|
" for session %d\n", kModuleDebugName, endLBA,
|
||||||
sessionIndex));
|
sessionIndex));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
WARN(("%s: warning: duplicate end lba values found for "
|
WARN(("%s: warning: duplicate end lba values found for "
|
||||||
"session %d; using first value encountered: %lld",
|
"session %d; using first value encountered: %" B_PRId64,
|
||||||
kModuleDebugName, sessionIndex, session->end_lba));
|
kModuleDebugName, sessionIndex, session->end_lba));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -962,16 +965,16 @@ Disc::_CheckForErrorsAndWarnings() {
|
|||||||
// missing end lba
|
// missing end lba
|
||||||
if (!session->end_lba_is_set()) {
|
if (!session->end_lba_is_set()) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: error: no end of "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: error: no end of "
|
||||||
"session address for session #%ld\n", kModuleDebugName,
|
"session address for session #%" B_PRId32 "\n",
|
||||||
session->index));
|
kModuleDebugName, session->index));
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// empty track list
|
// empty track list
|
||||||
track* track = (struct track*)session->track_list.First();
|
track* track = (struct track*)session->track_list.First();
|
||||||
if (track == NULL) {
|
if (track == NULL) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: error: session #%ld "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: error: session #%"
|
||||||
"has no tracks\n", kModuleDebugName, session->index));
|
B_PRId32 "has no tracks\n", kModuleDebugName, session->index));
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -981,9 +984,9 @@ Disc::_CheckForErrorsAndWarnings() {
|
|||||||
if (session->first_track_hint_is_set()
|
if (session->first_track_hint_is_set()
|
||||||
&& session->first_track_hint != track->index) {
|
&& session->first_track_hint != track->index) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: session "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: session "
|
||||||
"#%ld: first track hint (%d) doesn't match actual first track "
|
"#%" B_PRId32 ": first track hint (%d) doesn't match actual "
|
||||||
"(%ld)\n", kModuleDebugName, session->index,
|
"first track (%" B_PRId32 ")\n", kModuleDebugName,
|
||||||
session->first_track_hint, track->index));
|
session->index, session->first_track_hint, track->index));
|
||||||
}
|
}
|
||||||
|
|
||||||
// incorrect last track hint
|
// incorrect last track hint
|
||||||
@@ -991,16 +994,17 @@ Disc::_CheckForErrorsAndWarnings() {
|
|||||||
if (session->last_track_hint_is_set() && last
|
if (session->last_track_hint_is_set() && last
|
||||||
&& session->last_track_hint != last->index) {
|
&& session->last_track_hint != last->index) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: session "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: session "
|
||||||
"#%ld: last track hint (%d) doesn't match actual last track "
|
"#%" B_PRId32 ": last track hint (%d) doesn't match actual "
|
||||||
"(%ld)\n", kModuleDebugName, session->index,
|
"last track (%" B_PRId32 ")\n", kModuleDebugName,
|
||||||
session->last_track_hint, last->index));
|
session->index, session->last_track_hint, last->index));
|
||||||
}
|
}
|
||||||
|
|
||||||
// invalid session sequence
|
// invalid session sequence
|
||||||
if (lastSessionIndex + 1 != session->index) {
|
if (lastSessionIndex + 1 != session->index) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: index for "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: index for "
|
||||||
"session #%ld is out of sequence (should have been #%ld)\n",
|
"session #%" B_PRId32 " is out of sequence (should have been #%"
|
||||||
kModuleDebugName, session->index, lastSessionIndex));
|
B_PRId32 ")\n", kModuleDebugName, session->index,
|
||||||
|
lastSessionIndex));
|
||||||
}
|
}
|
||||||
lastSessionIndex = session->index;
|
lastSessionIndex = session->index;
|
||||||
|
|
||||||
@@ -1008,17 +1012,19 @@ Disc::_CheckForErrorsAndWarnings() {
|
|||||||
// invalid track sequence
|
// invalid track sequence
|
||||||
if (lastTrackIndex + 1 != track->index) {
|
if (lastTrackIndex + 1 != track->index) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: index "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: index "
|
||||||
"for track #%ld is out of sequence (should have been "
|
"for track #%" B_PRId32 " is out of sequence (should have "
|
||||||
"#%ld)\n", kModuleDebugName, track->index, lastTrackIndex));
|
"been #%" B_PRId32 ")\n", kModuleDebugName, track->index,
|
||||||
|
lastTrackIndex));
|
||||||
}
|
}
|
||||||
lastTrackIndex = track->index;
|
lastTrackIndex = track->index;
|
||||||
|
|
||||||
// mismatched control
|
// mismatched control
|
||||||
if (track->control != session->control) {
|
if (track->control != session->control) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: control "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: control "
|
||||||
"for track #%ld (%d, %s track, copy %s) does not match "
|
"for track #%" B_PRId32 " (%d, %s track, copy %s) does not "
|
||||||
"control for parent session #%ld (%d, %s session, copy "
|
"match control for parent session #%" B_PRId32 " (%d, %s "
|
||||||
"%s)\n", kModuleDebugName, track->index, track->control,
|
"session, copy %s)\n", kModuleDebugName, track->index,
|
||||||
|
track->control,
|
||||||
(track->control & kControlDataTrack ? "data" : "audio"),
|
(track->control & kControlDataTrack ? "data" : "audio"),
|
||||||
(track->control & kControlCopyPermitted
|
(track->control & kControlCopyPermitted
|
||||||
? "permitted" : "prohibited"),
|
? "permitted" : "prohibited"),
|
||||||
@@ -1031,9 +1037,10 @@ Disc::_CheckForErrorsAndWarnings() {
|
|||||||
// mismatched adr
|
// mismatched adr
|
||||||
if (track->adr != session->adr) {
|
if (track->adr != session->adr) {
|
||||||
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: adr "
|
TRACE(("%s: Disc::_CheckForErrorsAndWarnings: warning: adr "
|
||||||
"for track #%ld (adr = %d) does not match adr for parent "
|
"for track #%" B_PRId32 " (adr = %d) does not match adr "
|
||||||
"session #%ld (adr = %d)\n", kModuleDebugName, track->index,
|
"for parent session #%" B_PRId32 " (adr = %d)\n",
|
||||||
track->adr, session->index, session->adr));
|
kModuleDebugName, track->index, track->adr, session->index,
|
||||||
|
session->adr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ standard_operations(int32 op, ...)
|
|||||||
static float
|
static float
|
||||||
identify_partition(int fd, partition_data *partition, void **cookie)
|
identify_partition(int fd, partition_data *partition, void **cookie)
|
||||||
{
|
{
|
||||||
DEBUG_INIT_ETC(NULL, ("fd: %d, id: %ld, offset: %Ld, "
|
DEBUG_INIT_ETC(NULL, ("fd: %d, id: %" B_PRId32 ", offset: %" B_PRIdOFF ", "
|
||||||
"size: %Ld, block_size: %ld, flags: 0x%lx", fd,
|
"size: %" B_PRIdOFF ", block_size: %" B_PRId32 ", flags: 0x%" B_PRIx32,
|
||||||
partition->id, partition->offset, partition->size,
|
fd, partition->id, partition->offset, partition->size,
|
||||||
partition->block_size, partition->flags));
|
partition->block_size, partition->flags));
|
||||||
|
|
||||||
device_geometry geometry;
|
device_geometry geometry;
|
||||||
@@ -70,9 +70,10 @@ identify_partition(int fd, partition_data *partition, void **cookie)
|
|||||||
static status_t
|
static status_t
|
||||||
scan_partition(int fd, partition_data *partition, void *cookie)
|
scan_partition(int fd, partition_data *partition, void *cookie)
|
||||||
{
|
{
|
||||||
DEBUG_INIT_ETC(NULL, ("fd: %d, id: %ld, offset: %Ld, size: %Ld, "
|
DEBUG_INIT_ETC(NULL, ("fd: %d, id: %" B_PRId32 ", offset: %" B_PRId64 ", "
|
||||||
"block_size: %ld, cookie: %p", fd, partition->id, partition->offset,
|
"size: %" B_PRIdOFF ", block_size: %" B_PRId32 ", cookie: %p", fd,
|
||||||
partition->size, partition->block_size, cookie));
|
partition->id, partition->offset, partition->size,
|
||||||
|
partition->block_size, cookie));
|
||||||
|
|
||||||
Disc *disc = static_cast<Disc*>(cookie);
|
Disc *disc = static_cast<Disc*>(cookie);
|
||||||
partition->status = B_PARTITION_VALID;
|
partition->status = B_PARTITION_VALID;
|
||||||
@@ -100,7 +101,7 @@ scan_partition(int fd, partition_data *partition, void *cookie)
|
|||||||
}
|
}
|
||||||
child->parameters = NULL;
|
child->parameters = NULL;
|
||||||
}
|
}
|
||||||
PRINT(("error: 0x%lx, `%s'\n", error, strerror(error)));
|
PRINT(("error: 0x%" B_PRIx32 ", `%s'\n", error, strerror(error)));
|
||||||
RETURN(error);
|
RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1025,14 +1025,14 @@ SMTPProtocol::SendCommand(const char *cmd)
|
|||||||
int32 len = ReceiveResponse(fLog);
|
int32 len = ReceiveResponse(fLog);
|
||||||
|
|
||||||
if (len <= 0) {
|
if (len <= 0) {
|
||||||
D(bug("SMTP: len == %ld\n", len));
|
D(bug("SMTP: len == %" B_PRId32 "\n", len));
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fLog.Length() > 4 && (fLog[3] == ' ' || fLog[3] == '-'))
|
if (fLog.Length() > 4 && (fLog[3] == ' ' || fLog[3] == '-'))
|
||||||
{
|
{
|
||||||
int32 num = atol(fLog.String());
|
int32 num = atol(fLog.String());
|
||||||
D(bug("ReplyNumber: %ld\n", num));
|
D(bug("ReplyNumber: %" B_PRId32 "\n", num));
|
||||||
if (num >= 500)
|
if (num >= 500)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
inline void PRINT(int level, const char *fmt, ...) { va_list ap; if (level > DEBUG) return; va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); }
|
inline void PRINT(int level, const char *fmt, ...) { va_list ap; if (level > DEBUG) return; va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); }
|
||||||
|
|
||||||
# define PRINT_FORMAT(_text, _fmt) do { char _buf[300]; string_for_format((_fmt), _buf, sizeof(_buf)); printf("%s %s\n", (_text), (_buf)); } while (0)
|
# define PRINT_FORMAT(_text, _fmt) do { char _buf[300]; string_for_format((_fmt), _buf, sizeof(_buf)); printf("%s %s\n", (_text), (_buf)); } while (0)
|
||||||
# define PRINT_INPUT(_text, _in) do { char _buf[300]; string_for_format((_in).format, _buf, sizeof(_buf)); printf("%s node(node %ld, port %ld); source(port %ld, id %ld); dest(port %ld, id %ld); fmt(%s); name(%s)\n", (_text), (_in).node.node, (_in).node.port, (_in).source.port, (_in).source.id, (_in).destination.port, (_in).destination.id, _buf, (_in).name); } while (0)
|
# define PRINT_INPUT(_text, _in) do { char _buf[300]; string_for_format((_in).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_in).node.node, (_in).node.port, (_in).source.port, (_in).source.id, (_in).destination.port, (_in).destination.id, _buf, (_in).name); } while (0)
|
||||||
# define PRINT_OUTPUT(_text, _out) do { char _buf[300]; string_for_format((_out).format, _buf, sizeof(_buf)); printf("%s node(node %ld, port %ld); source(port %ld, id %ld); dest(port %ld, id %ld); fmt(%s); name(%s)\n", (_text), (_out).node.node, (_out).node.port, (_out).source.port, (_out).source.id, (_out).destination.port, (_out).destination.id, _buf, (_out).name); } while (0)
|
# define PRINT_OUTPUT(_text, _out) do { char _buf[300]; string_for_format((_out).format, _buf, sizeof(_buf)); printf("%s node(node %" B_PRId32 ", port %" B_PRId32 "); source(port %" B_PRId32 ", id %" B_PRId32 "); dest(port %" B_PRId32 ", id %" B_PRId32 "); fmt(%s); name(%s)\n", (_text), (_out).node.node, (_out).node.port, (_out).source.port, (_out).source.id, (_out).destination.port, (_out).destination.id, _buf, (_out).name); } while (0)
|
||||||
# define PRINT_CHANNEL_MASK(fmt) do { char s[200]; StringForChannelMask(s, (fmt).u.raw_audio.channel_mask); printf(" channel_mask 0x%08lX %s\n", (fmt).u.raw_audio.channel_mask, s); } while (0)
|
# define PRINT_CHANNEL_MASK(fmt) do { char s[200]; StringForChannelMask(s, (fmt).u.raw_audio.channel_mask); printf(" channel_mask 0x%08" B_PRIX32 " %s\n", (fmt).u.raw_audio.channel_mask, s); } while (0)
|
||||||
|
|
||||||
# if DEBUG >= 2
|
# if DEBUG >= 2
|
||||||
# define TRACE printf
|
# define TRACE printf
|
||||||
|
|||||||
@@ -143,7 +143,8 @@ MultiAudioDevice::_InitDriver()
|
|||||||
|
|
||||||
PRINT(("Friendly name:\t%s\nVendor:\t\t%s\n",
|
PRINT(("Friendly name:\t%s\nVendor:\t\t%s\n",
|
||||||
fDescription.friendly_name, fDescription.vendor_info));
|
fDescription.friendly_name, fDescription.vendor_info));
|
||||||
PRINT(("%ld outputs\t%ld inputs\n%ld out busses\t%ld in busses\n",
|
PRINT(("%" B_PRId32 " outputs\t%" B_PRId32 " inputs\n%" B_PRId32
|
||||||
|
" out busses\t%" B_PRId32 " in busses\n",
|
||||||
fDescription.output_channel_count, fDescription.input_channel_count,
|
fDescription.output_channel_count, fDescription.input_channel_count,
|
||||||
fDescription.output_bus_channel_count,
|
fDescription.output_bus_channel_count,
|
||||||
fDescription.input_bus_channel_count));
|
fDescription.input_bus_channel_count));
|
||||||
@@ -152,22 +153,23 @@ MultiAudioDevice::_InitDriver()
|
|||||||
|
|
||||||
for (int32 i = 0; i < fDescription.output_channel_count
|
for (int32 i = 0; i < fDescription.output_channel_count
|
||||||
+ fDescription.input_channel_count; i++) {
|
+ fDescription.input_channel_count; i++) {
|
||||||
PRINT(("%ld\t%d\t0x%lx\t0x%lx\n", fDescription.channels[i].channel_id,
|
PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n",
|
||||||
|
fDescription.channels[i].channel_id,
|
||||||
fDescription.channels[i].kind,
|
fDescription.channels[i].kind,
|
||||||
fDescription.channels[i].designations,
|
fDescription.channels[i].designations,
|
||||||
fDescription.channels[i].connectors));
|
fDescription.channels[i].connectors));
|
||||||
}
|
}
|
||||||
PRINT(("\n"));
|
PRINT(("\n"));
|
||||||
|
|
||||||
PRINT(("Output rates\t\t0x%lx\n", fDescription.output_rates));
|
PRINT(("Output rates\t\t0x%" B_PRIx32 "\n", fDescription.output_rates));
|
||||||
PRINT(("Input rates\t\t0x%lx\n", fDescription.input_rates));
|
PRINT(("Input rates\t\t0x%" B_PRIx32 "\n", fDescription.input_rates));
|
||||||
PRINT(("Max CVSR\t\t%.0f\n", fDescription.max_cvsr_rate));
|
PRINT(("Max CVSR\t\t%.0f\n", fDescription.max_cvsr_rate));
|
||||||
PRINT(("Min CVSR\t\t%.0f\n", fDescription.min_cvsr_rate));
|
PRINT(("Min CVSR\t\t%.0f\n", fDescription.min_cvsr_rate));
|
||||||
PRINT(("Output formats\t\t0x%lx\n", fDescription.output_formats));
|
PRINT(("Output formats\t\t0x%" B_PRIx32 "\n", fDescription.output_formats));
|
||||||
PRINT(("Input formats\t\t0x%lx\n", fDescription.input_formats));
|
PRINT(("Input formats\t\t0x%" B_PRIx32 "\n", fDescription.input_formats));
|
||||||
PRINT(("Lock sources\t\t0x%lx\n", fDescription.lock_sources));
|
PRINT(("Lock sources\t\t0x%" B_PRIx32 "\n", fDescription.lock_sources));
|
||||||
PRINT(("Timecode sources\t0x%lx\n", fDescription.timecode_sources));
|
PRINT(("Timecode sources\t0x%" B_PRIx32 "\n", fDescription.timecode_sources));
|
||||||
PRINT(("Interface flags\t\t0x%lx\n", fDescription.interface_flags));
|
PRINT(("Interface flags\t\t0x%" B_PRIx32 "\n", fDescription.interface_flags));
|
||||||
PRINT(("Control panel string:\t\t%s\n", fDescription.control_panel));
|
PRINT(("Control panel string:\t\t%s\n", fDescription.control_panel));
|
||||||
PRINT(("\n"));
|
PRINT(("\n"));
|
||||||
|
|
||||||
@@ -271,18 +273,22 @@ MultiAudioDevice::_GetBuffers()
|
|||||||
|
|
||||||
for (int32 i = 0; i < fBufferList.return_playback_buffers; i++) {
|
for (int32 i = 0; i < fBufferList.return_playback_buffers; i++) {
|
||||||
for (int32 j = 0; j < fBufferList.return_playback_channels; j++) {
|
for (int32 j = 0; j < fBufferList.return_playback_channels; j++) {
|
||||||
PRINT(("fBufferList.playback_buffers[%ld][%ld].base: %p\n",
|
PRINT(("fBufferList.playback_buffers[%" B_PRId32 "][%" B_PRId32
|
||||||
|
"].base: %p\n",
|
||||||
i, j, fBufferList.playback_buffers[i][j].base));
|
i, j, fBufferList.playback_buffers[i][j].base));
|
||||||
PRINT(("fBufferList.playback_buffers[%ld][%ld].stride: %li\n",
|
PRINT(("fBufferList.playback_buffers[%" B_PRId32 "][%" B_PRId32
|
||||||
|
"].stride: %li\n",
|
||||||
i, j, fBufferList.playback_buffers[i][j].stride));
|
i, j, fBufferList.playback_buffers[i][j].stride));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int32 i = 0; i < fBufferList.return_record_buffers; i++) {
|
for (int32 i = 0; i < fBufferList.return_record_buffers; i++) {
|
||||||
for (int32 j = 0; j < fBufferList.return_record_channels; j++) {
|
for (int32 j = 0; j < fBufferList.return_record_channels; j++) {
|
||||||
PRINT(("fBufferList.record_buffers[%ld][%ld].base: %p\n",
|
PRINT(("fBufferList.record_buffers[%" B_PRId32 "][%" B_PRId32
|
||||||
|
"].base: %p\n",
|
||||||
i, j, fBufferList.record_buffers[i][j].base));
|
i, j, fBufferList.record_buffers[i][j].base));
|
||||||
PRINT(("fBufferList.record_buffers[%ld][%ld].stride: %li\n",
|
PRINT(("fBufferList.record_buffers[%" B_PRId32 "][%" B_PRId32
|
||||||
|
"].stride: %li\n",
|
||||||
i, j, fBufferList.record_buffers[i][j].stride));
|
i, j, fBufferList.record_buffers[i][j].stride));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -351,8 +351,9 @@ MultiAudioNode::NodeRegistered()
|
|||||||
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
||||||
!(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS)))
|
!(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS)))
|
||||||
) {
|
) {
|
||||||
PRINT(("NodeRegistered() : creating an input for %li\n", i));
|
PRINT(("NodeRegistered() : creating an input for %" B_PRIi32 "\n",
|
||||||
PRINT(("%ld\t%d\t0x%lx\t0x%lx\n",
|
i));
|
||||||
|
PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n",
|
||||||
fDevice->Description().channels[i].channel_id,
|
fDevice->Description().channels[i].channel_id,
|
||||||
fDevice->Description().channels[i].kind,
|
fDevice->Description().channels[i].kind,
|
||||||
fDevice->Description().channels[i].designations,
|
fDevice->Description().channels[i].designations,
|
||||||
@@ -401,11 +402,13 @@ MultiAudioNode::NodeRegistered()
|
|||||||
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
&& ( fDevice->Description().channels[i].designations & B_CHANNEL_LEFT ||
|
||||||
!(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS)))
|
!(fDevice->Description().channels[i].designations & B_CHANNEL_SURROUND_BUS)))
|
||||||
) {
|
) {
|
||||||
PRINT(("NodeRegistered() : creating an output for %li\n", i));
|
PRINT(("NodeRegistered() : creating an output for %" B_PRIi32 "\n",
|
||||||
PRINT(("%ld\t%d\t0x%lx\t0x%lx\n",fDevice->Description().channels[i].channel_id,
|
i));
|
||||||
fDevice->Description().channels[i].kind,
|
PRINT(("%" B_PRId32 "\t%d\t0x%" B_PRIx32 "\t0x%" B_PRIx32 "\n",
|
||||||
fDevice->Description().channels[i].designations,
|
fDevice->Description().channels[i].channel_id,
|
||||||
fDevice->Description().channels[i].connectors));
|
fDevice->Description().channels[i].kind,
|
||||||
|
fDevice->Description().channels[i].designations,
|
||||||
|
fDevice->Description().channels[i].connectors));
|
||||||
|
|
||||||
media_output *output = new media_output;
|
media_output *output = new media_output;
|
||||||
|
|
||||||
@@ -456,7 +459,8 @@ MultiAudioNode::NodeRegistered()
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("apply configuration in : %Ld\n", system_time() - start));
|
PRINT(("apply configuration in : %" B_PRIdBIGTIME "\n",
|
||||||
|
system_time() - start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -569,7 +573,8 @@ MultiAudioNode::GetNextInput(int32* cookie, media_input* _input)
|
|||||||
node_input *channel = (node_input *)fInputs.ItemAt(*cookie);
|
node_input *channel = (node_input *)fInputs.ItemAt(*cookie);
|
||||||
*_input = channel->fInput;
|
*_input = channel->fInput;
|
||||||
*cookie += 1;
|
*cookie += 1;
|
||||||
PRINT(("input.format : %lu\n", channel->fInput.format.u.raw_audio.format));
|
PRINT(("input.format : %" B_PRIu32 "\n",
|
||||||
|
channel->fInput.format.u.raw_audio.format));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -976,10 +981,11 @@ MultiAudioNode::Connect(status_t error, const media_source& source,
|
|||||||
// Do so, then make sure we get our events early enough.
|
// Do so, then make sure we get our events early enough.
|
||||||
media_node_id id;
|
media_node_id id;
|
||||||
FindLatencyFor(channel->fOutput.destination, &fLatency, &id);
|
FindLatencyFor(channel->fOutput.destination, &fLatency, &id);
|
||||||
PRINT(("\tdownstream latency = %Ld\n", fLatency));
|
PRINT(("\tdownstream latency = %" B_PRIdBIGTIME "\n", fLatency));
|
||||||
|
|
||||||
fInternalLatency = BufferDuration();
|
fInternalLatency = BufferDuration();
|
||||||
PRINT(("\tbuffer-filling took %Ld usec on this machine\n", fInternalLatency));
|
PRINT(("\tbuffer-filling took %" B_PRIdBIGTIME " usec on this machine\n",
|
||||||
|
fInternalLatency));
|
||||||
//SetEventLatency(fLatency + fInternalLatency);
|
//SetEventLatency(fLatency + fInternalLatency);
|
||||||
|
|
||||||
// Set up the buffer group for our connection, as long as nobody handed us
|
// Set up the buffer group for our connection, as long as nobody handed us
|
||||||
@@ -1167,7 +1173,9 @@ MultiAudioNode::_HandleBuffer(const media_timed_event* event,
|
|||||||
// TODO: This seems like a very fragile mechanism to wait until
|
// TODO: This seems like a very fragile mechanism to wait until
|
||||||
// the previous buffer for this channel has been processed...
|
// the previous buffer for this channel has been processed...
|
||||||
if (channel->fBuffer != NULL) {
|
if (channel->fBuffer != NULL) {
|
||||||
PRINT(("MultiAudioNode::HandleBuffer snoozing recycling channelId : %li, how_early:%Ld\n", channel->fChannelId, howEarly));
|
PRINT(("MultiAudioNode::HandleBuffer snoozing recycling channelId : %"
|
||||||
|
B_PRIi32 ", how_early:%" B_PRIdBIGTIME "\n",
|
||||||
|
channel->fChannelId, howEarly));
|
||||||
//channel->fBuffer->Recycle();
|
//channel->fBuffer->Recycle();
|
||||||
snooze(100);
|
snooze(100);
|
||||||
if (channel->fBuffer != NULL)
|
if (channel->fBuffer != NULL)
|
||||||
@@ -1188,7 +1196,8 @@ MultiAudioNode::_HandleDataStatus(const media_timed_event* event,
|
|||||||
bigtime_t lateness, bool realTimeEvent)
|
bigtime_t lateness, bool realTimeEvent)
|
||||||
{
|
{
|
||||||
//CALLED();
|
//CALLED();
|
||||||
PRINT(("MultiAudioNode::HandleDataStatus status:%li, lateness:%Li\n", event->data, lateness));
|
PRINT(("MultiAudioNode::HandleDataStatus status:%" B_PRIi32
|
||||||
|
", lateness:%" B_PRIiBIGTIME "\n", event->data, lateness));
|
||||||
switch (event->data) {
|
switch (event->data) {
|
||||||
case B_DATA_NOT_AVAILABLE:
|
case B_DATA_NOT_AVAILABLE:
|
||||||
break;
|
break;
|
||||||
@@ -1219,7 +1228,8 @@ MultiAudioNode::_HandleSeek(const media_timed_event* event, bigtime_t lateness,
|
|||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
PRINT(("MultiAudioNode::HandleSeek(t=%lld,d=%li,bd=%lld)\n",
|
PRINT(("MultiAudioNode::HandleSeek(t=%" B_PRIdBIGTIME ",d=%" B_PRIi32
|
||||||
|
",bd=%" B_PRId64 ")\n",
|
||||||
event->event_time,event->data,event->bigdata));
|
event->event_time,event->data,event->bigdata));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -1324,7 +1334,7 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
PRINT(("id : %li\n", id));
|
PRINT(("id : %" B_PRIi32 "\n", id));
|
||||||
BParameter* parameter = NULL;
|
BParameter* parameter = NULL;
|
||||||
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
||||||
parameter = fWeb->ParameterAt(i);
|
parameter = fWeb->ParameterAt(i);
|
||||||
@@ -1335,7 +1345,7 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
if (parameter == NULL) {
|
if (parameter == NULL) {
|
||||||
// Hmmm, we were asked for a parameter that we don't actually
|
// Hmmm, we were asked for a parameter that we don't actually
|
||||||
// support. Report an error back to the caller.
|
// support. Report an error back to the caller.
|
||||||
PRINT(("\terror - asked for illegal parameter %ld\n", id));
|
PRINT(("\terror - asked for illegal parameter %" B_PRId32 "\n", id));
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1394,7 +1404,8 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (uint32 i = 0; i < *size / sizeof(float); i++) {
|
for (uint32 i = 0; i < *size / sizeof(float); i++) {
|
||||||
PRINT(("GetParameterValue B_CONTINUOUS_PARAMETER value[%li] : %f\n", i, ((float*)value)[i]));
|
PRINT(("GetParameterValue B_CONTINUOUS_PARAMETER value[%"
|
||||||
|
B_PRIi32 "] : %f\n", i, ((float*)value)[i]));
|
||||||
}
|
}
|
||||||
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
||||||
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
||||||
@@ -1406,7 +1417,8 @@ MultiAudioNode::GetParameterValue(int32 id, bigtime_t* lastChange, void* value,
|
|||||||
*size = sizeof(int32);
|
*size = sizeof(int32);
|
||||||
|
|
||||||
for (uint32 i = 0; i < *size / sizeof(int32); i++) {
|
for (uint32 i = 0; i < *size / sizeof(int32); i++) {
|
||||||
PRINT(("GetParameterValue B_DISCRETE_PARAMETER value[%li] : %li\n", i, ((int32*)value)[i]));
|
PRINT(("GetParameterValue B_DISCRETE_PARAMETER value[%" B_PRIi32
|
||||||
|
"] : %" B_PRIi32 "\n", i, ((int32*)value)[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1420,7 +1432,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
const void* value, size_t size)
|
const void* value, size_t size)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
PRINT(("id : %li, performance_time : %lld, size : %li\n", id, performanceTime, size));
|
PRINT(("id : %" B_PRIi32 ", performance_time : %" B_PRIdBIGTIME
|
||||||
|
", size : %" B_PRIuSIZE "\n", id, performanceTime, size));
|
||||||
|
|
||||||
BParameter* parameter = NULL;
|
BParameter* parameter = NULL;
|
||||||
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
for (int32 i = 0; i < fWeb->CountParameters(); i++) {
|
||||||
@@ -1547,7 +1560,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
|
|
||||||
if (parameter->Type() == BParameter::B_CONTINUOUS_PARAMETER) {
|
if (parameter->Type() == BParameter::B_CONTINUOUS_PARAMETER) {
|
||||||
for (uint32 i = 0; i < size / sizeof(float); i++) {
|
for (uint32 i = 0; i < size / sizeof(float); i++) {
|
||||||
PRINT(("SetParameterValue B_CONTINUOUS_PARAMETER value[%li] : %f\n", i, ((float*)value)[i]));
|
PRINT(("SetParameterValue B_CONTINUOUS_PARAMETER value[%" B_PRIi32
|
||||||
|
"] : %f\n", i, ((float*)value)[i]));
|
||||||
}
|
}
|
||||||
info.item_count = 1;
|
info.item_count = 1;
|
||||||
values[0].id = control_id;
|
values[0].id = control_id;
|
||||||
@@ -1560,7 +1574,8 @@ MultiAudioNode::SetParameterValue(int32 id, bigtime_t performanceTime,
|
|||||||
}
|
}
|
||||||
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
} else if (parameter->Type() == BParameter::B_DISCRETE_PARAMETER) {
|
||||||
for (uint32 i = 0; i < size / sizeof(int32); i++) {
|
for (uint32 i = 0; i < size / sizeof(int32); i++) {
|
||||||
PRINT(("SetParameterValue B_DISCRETE_PARAMETER value[%li] : %li\n", i, ((int32*)value)[i]));
|
PRINT(("SetParameterValue B_DISCRETE_PARAMETER value[%" B_PRIi32
|
||||||
|
"] : %" B_PRIi32 "\n", i, ((int32*)value)[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
BDiscreteParameter* discrete = (BDiscreteParameter*)parameter;
|
||||||
@@ -1589,7 +1604,7 @@ MultiAudioNode::MakeParameterWeb()
|
|||||||
CALLED();
|
CALLED();
|
||||||
BParameterWeb* web = new BParameterWeb;
|
BParameterWeb* web = new BParameterWeb;
|
||||||
|
|
||||||
PRINT(("MixControlInfo().control_count : %li\n",
|
PRINT(("MixControlInfo().control_count : %" B_PRIi32 "\n",
|
||||||
fDevice->MixControlInfo().control_count));
|
fDevice->MixControlInfo().control_count));
|
||||||
|
|
||||||
BParameterGroup* generalGroup = web->MakeGroup(B_TRANSLATE("General"));
|
BParameterGroup* generalGroup = web->MakeGroup(B_TRANSLATE("General"));
|
||||||
@@ -1680,7 +1695,7 @@ MultiAudioNode::_ProcessGroup(BParameterGroup* group, int32 index,
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("num parameters : %ld\n", numParameters));
|
PRINT(("num parameters : %" B_PRId32 "\n", numParameters));
|
||||||
if (numParameters > 0) {
|
if (numParameters > 0) {
|
||||||
(group->ParameterAt(numParameters - 1))->AddOutput(
|
(group->ParameterAt(numParameters - 1))->AddOutput(
|
||||||
group->ParameterAt(numParameters));
|
group->ParameterAt(numParameters));
|
||||||
@@ -1826,12 +1841,12 @@ MultiAudioNode::_OutputThread()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("MultiAudioNode::RunThread: recorded_real_time : %Ld\n",
|
PRINT(("MultiAudioNode::RunThread: recorded_real_time : %" B_PRIdBIGTIME
|
||||||
bufferInfo.recorded_real_time));
|
"\n", bufferInfo.recorded_real_time));
|
||||||
PRINT(("MultiAudioNode::RunThread: recorded_frames_count : %Ld\n",
|
PRINT(("MultiAudioNode::RunThread: recorded_frames_count : %"
|
||||||
bufferInfo.recorded_frames_count));
|
B_PRId64 "\n", bufferInfo.recorded_frames_count));
|
||||||
PRINT(("MultiAudioNode::RunThread: record_buffer_cycle : %li\n",
|
PRINT(("MultiAudioNode::RunThread: record_buffer_cycle : %" B_PRIi32
|
||||||
bufferInfo.record_buffer_cycle));
|
"\n", bufferInfo.record_buffer_cycle));
|
||||||
|
|
||||||
for (int32 i = 0; i < fOutputs.CountItems(); i++) {
|
for (int32 i = 0; i < fOutputs.CountItems(); i++) {
|
||||||
node_output* output = (node_output*)fOutputs.ItemAt(i);
|
node_output* output = (node_output*)fOutputs.ItemAt(i);
|
||||||
@@ -2073,9 +2088,10 @@ MultiAudioNode::_AllocateBuffers(node_output &channel)
|
|||||||
size_t size = channel.fOutput.format.u.raw_audio.buffer_size;
|
size_t size = channel.fOutput.format.u.raw_audio.buffer_size;
|
||||||
int32 count = int32(fLatency / BufferDuration() + 1 + 1);
|
int32 count = int32(fLatency / BufferDuration() + 1 + 1);
|
||||||
|
|
||||||
PRINT(("\tlatency = %Ld, buffer duration = %Ld\n", fLatency,
|
PRINT(("\tlatency = %" B_PRIdBIGTIME ", buffer duration = %" B_PRIdBIGTIME
|
||||||
BufferDuration()));
|
"\n", fLatency, BufferDuration()));
|
||||||
PRINT(("\tcreating group of %ld buffers, size = %lu\n", count, size));
|
PRINT(("\tcreating group of %" B_PRId32 " buffers, size = %" B_PRIuSIZE
|
||||||
|
"\n", count, size));
|
||||||
channel.fBufferGroup = new BBufferGroup(size, count);
|
channel.fBufferGroup = new BBufferGroup(size, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2183,7 +2199,7 @@ MultiAudioNode::GetConfigurationFor(BMessage* message)
|
|||||||
&& parameter->Type() != BParameter::B_DISCRETE_PARAMETER)
|
&& parameter->Type() != BParameter::B_DISCRETE_PARAMETER)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
PRINT(("getting parameter %li\n", parameter->ID()));
|
PRINT(("getting parameter %" B_PRIi32 "\n", parameter->ID()));
|
||||||
size_t size = bufferSize;
|
size_t size = bufferSize;
|
||||||
while ((err = GetParameterValue(parameter->ID(), &lastChange, buffer,
|
while ((err = GetParameterValue(parameter->ID(), &lastChange, buffer,
|
||||||
&size)) == B_NO_MEMORY && bufferSize < 128 * 1024) {
|
&size)) == B_NO_MEMORY && bufferSize < 128 * 1024) {
|
||||||
@@ -2384,7 +2400,7 @@ MultiAudioNode::_UpdateInternalLatency(const media_format& format)
|
|||||||
* format.u.raw_audio.channel_count)
|
* format.u.raw_audio.channel_count)
|
||||||
/ ((int32)(format.u.raw_audio.frame_rate / 100));
|
/ ((int32)(format.u.raw_audio.frame_rate / 100));
|
||||||
|
|
||||||
PRINT((" internal latency = %lld\n",fInternalLatency));
|
PRINT((" internal latency = %" B_PRIdBIGTIME "\n", fInternalLatency));
|
||||||
|
|
||||||
SetEventLatency(fInternalLatency);
|
SetEventLatency(fInternalLatency);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,7 +152,8 @@ ToneProducer::GetParameterValue(int32 id, bigtime_t* last_change, void* value, s
|
|||||||
default:
|
default:
|
||||||
// Hmmm, we were asked for a parameter that we don't actually
|
// Hmmm, we were asked for a parameter that we don't actually
|
||||||
// support. Report an error back to the caller.
|
// support. Report an error back to the caller.
|
||||||
FPRINTF(stderr, "\terror - asked for illegal parameter %ld\n", id);
|
FPRINTF(stderr, "\terror - asked for illegal parameter %" B_PRId32 "\n",
|
||||||
|
id);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -380,7 +381,7 @@ ToneProducer::PrepareToConnect(const media_source& what, const media_destination
|
|||||||
if(format->u.raw_audio.channel_count == media_raw_audio_format::wildcard.channel_count) {
|
if(format->u.raw_audio.channel_count == media_raw_audio_format::wildcard.channel_count) {
|
||||||
//format->u.raw_audio.channel_count = mPreferredFormat.u.raw_audio.channel_count;
|
//format->u.raw_audio.channel_count = mPreferredFormat.u.raw_audio.channel_count;
|
||||||
format->u.raw_audio.channel_count = 1;
|
format->u.raw_audio.channel_count = 1;
|
||||||
FPRINTF(stderr, "\tno channel count provided, suggesting %lu\n", format->u.raw_audio.channel_count);
|
FPRINTF(stderr, "\tno channel count provided, suggesting %" B_PRIu32 "\n", format->u.raw_audio.channel_count);
|
||||||
}
|
}
|
||||||
if(format->u.raw_audio.byte_order == media_raw_audio_format::wildcard.byte_order) {
|
if(format->u.raw_audio.byte_order == media_raw_audio_format::wildcard.byte_order) {
|
||||||
format->u.raw_audio.byte_order = mPreferredFormat.u.raw_audio.byte_order;
|
format->u.raw_audio.byte_order = mPreferredFormat.u.raw_audio.byte_order;
|
||||||
@@ -451,7 +452,7 @@ ToneProducer::Connect(status_t error, const media_source& source, const media_de
|
|||||||
// Do so, then make sure we get our events early enough.
|
// Do so, then make sure we get our events early enough.
|
||||||
media_node_id id;
|
media_node_id id;
|
||||||
FindLatencyFor(mOutput.destination, &mLatency, &id);
|
FindLatencyFor(mOutput.destination, &mLatency, &id);
|
||||||
FPRINTF(stderr, "\tdownstream latency = %Ld\n", mLatency);
|
FPRINTF(stderr, "\tdownstream latency = %" B_PRIdBIGTIME "\n", mLatency);
|
||||||
|
|
||||||
// Use a dry run to see how long it takes me to fill a buffer of data
|
// Use a dry run to see how long it takes me to fill a buffer of data
|
||||||
bigtime_t start, produceLatency;
|
bigtime_t start, produceLatency;
|
||||||
@@ -468,7 +469,8 @@ ToneProducer::Connect(status_t error, const media_source& source, const media_de
|
|||||||
mInternalLatency += 20000LL;
|
mInternalLatency += 20000LL;
|
||||||
|
|
||||||
delete [] data;
|
delete [] data;
|
||||||
FPRINTF(stderr, "\tbuffer-filling took %Ld usec on this machine\n", mInternalLatency);
|
FPRINTF(stderr, "\tbuffer-filling took %" B_PRIdBIGTIME
|
||||||
|
" usec on this machine\n", mInternalLatency);
|
||||||
SetEventLatency(mLatency + mInternalLatency);
|
SetEventLatency(mLatency + mInternalLatency);
|
||||||
|
|
||||||
// reset our buffer duration, etc. to avoid later calculations
|
// reset our buffer duration, etc. to avoid later calculations
|
||||||
@@ -500,7 +502,8 @@ ToneProducer::Disconnect(const media_source& what, const media_destination& wher
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FPRINTF(stderr, "\tDisconnect() called with wrong source/destination (%ld/%ld), ours is (%ld/%ld)\n",
|
FPRINTF(stderr, "\tDisconnect() called with wrong source/destination (%"
|
||||||
|
B_PRId32 "/%" B_PRId32 "), ours is (%" B_PRId32 "/%" B_PRId32 ")\n",
|
||||||
what.id, where.id, mOutput.source.id, mOutput.destination.id);
|
what.id, where.id, mOutput.source.id, mOutput.destination.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -533,7 +536,8 @@ ToneProducer::LateNoticeReceived(const media_source& what, bigtime_t how_much, b
|
|||||||
mInternalLatency = 50000;
|
mInternalLatency = 50000;
|
||||||
SetEventLatency(mLatency + mInternalLatency);
|
SetEventLatency(mLatency + mInternalLatency);
|
||||||
|
|
||||||
FPRINTF(stderr, "\tincreasing latency to %Ld\n", mLatency + mInternalLatency);
|
FPRINTF(stderr, "\tincreasing latency to %" B_PRIdBIGTIME "\n",
|
||||||
|
mLatency + mInternalLatency);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -576,7 +580,8 @@ ToneProducer::SetPlayRate(int32 numer, int32 denom)
|
|||||||
status_t
|
status_t
|
||||||
ToneProducer::HandleMessage(int32 message, const void* data, size_t size)
|
ToneProducer::HandleMessage(int32 message, const void* data, size_t size)
|
||||||
{
|
{
|
||||||
FPRINTF(stderr, "ToneProducer::HandleMessage(%ld = 0x%lx)\n", message, message);
|
FPRINTF(stderr, "ToneProducer::HandleMessage(%" B_PRId32 " = 0x%" B_PRIx32
|
||||||
|
")\n", message, message);
|
||||||
// HandleMessage() is where you implement any private message protocols
|
// HandleMessage() is where you implement any private message protocols
|
||||||
// that you want to use. When messages are written to your node's control
|
// that you want to use. When messages are written to your node's control
|
||||||
// port that are not recognized by any of the node superclasses, they'll be
|
// port that are not recognized by any of the node superclasses, they'll be
|
||||||
@@ -602,7 +607,8 @@ ToneProducer::LatencyChanged(
|
|||||||
bigtime_t new_latency,
|
bigtime_t new_latency,
|
||||||
uint32 flags)
|
uint32 flags)
|
||||||
{
|
{
|
||||||
PRINT(("ToneProducer::LatencyChanged(): %Ld\n", new_latency));
|
PRINT(("ToneProducer::LatencyChanged(): %" B_PRIdBIGTIME "\n",
|
||||||
|
new_latency));
|
||||||
|
|
||||||
// something downstream changed latency, so we need to start producing
|
// something downstream changed latency, so we need to start producing
|
||||||
// buffers earlier (or later) than we were previously. Make sure that the
|
// buffers earlier (or later) than we were previously. Make sure that the
|
||||||
@@ -646,7 +652,8 @@ ToneProducer::NodeRegistered()
|
|||||||
void
|
void
|
||||||
ToneProducer::Start(bigtime_t performance_time)
|
ToneProducer::Start(bigtime_t performance_time)
|
||||||
{
|
{
|
||||||
PRINT(("ToneProducer::Start(%Ld): now %Ld\n", performance_time, TimeSource()->Now()));
|
PRINT(("ToneProducer::Start(%" B_PRIdBIGTIME "): now %" B_PRIdBIGTIME "\n",
|
||||||
|
performance_time, TimeSource()->Now()));
|
||||||
|
|
||||||
// send 'data available' message
|
// send 'data available' message
|
||||||
if(mOutput.destination != media_destination::null)
|
if(mOutput.destination != media_destination::null)
|
||||||
@@ -789,7 +796,7 @@ ToneProducer::HandleEvent(const media_timed_event* event, bigtime_t lateness, bo
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FPRINTF(stderr, "Hmmm... got a B_PARAMETER event for a parameter we don't have? (%ld)\n", param);
|
FPRINTF(stderr, "Hmmm... got a B_PARAMETER event for a parameter we don't have? (%" B_PRId32 ")\n", param);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -873,8 +880,10 @@ ToneProducer::AllocateBuffers()
|
|||||||
size_t size = mOutput.format.u.raw_audio.buffer_size;
|
size_t size = mOutput.format.u.raw_audio.buffer_size;
|
||||||
int32 count = int32(mLatency / BufferDuration() + 1 + 1);
|
int32 count = int32(mLatency / BufferDuration() + 1 + 1);
|
||||||
|
|
||||||
FPRINTF(stderr, "\tlatency = %Ld, buffer duration = %Ld\n", mLatency, BufferDuration());
|
FPRINTF(stderr, "\tlatency = %" B_PRIdBIGTIME ", buffer duration = %"
|
||||||
FPRINTF(stderr, "\tcreating group of %ld buffers, size = %lx\n", count, size);
|
B_PRIdBIGTIME "\n", mLatency, BufferDuration());
|
||||||
|
FPRINTF(stderr, "\tcreating group of %" B_PRId32 " buffers, size = %"
|
||||||
|
B_PRIuSIZE "\n", count, size);
|
||||||
mBufferGroup = new BBufferGroup(size, count);
|
mBufferGroup = new BBufferGroup(size, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -334,7 +334,8 @@ Translate( /* required */
|
|||||||
free(comment);
|
free(comment);
|
||||||
}
|
}
|
||||||
if (err < B_OK) {
|
if (err < B_OK) {
|
||||||
dprintf(("read_ppm_header() error %s [%lx]\n", strerror(err), err));
|
dprintf(("read_ppm_header() error %s [%" B_PRIx32 "]\n", strerror(err),
|
||||||
|
err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
/* Check if we're configured to write ASCII format file. */
|
/* Check if we're configured to write ASCII format file. */
|
||||||
@@ -422,11 +423,11 @@ Translate( /* required */
|
|||||||
hdr.dataSize = B_HOST_TO_BENDIAN_INT32(out_rowbytes*height);
|
hdr.dataSize = B_HOST_TO_BENDIAN_INT32(out_rowbytes*height);
|
||||||
dprintf(("rowBytes is %d, width %d, out_space %x, space %x\n", out_rowbytes, width, out_space, space));
|
dprintf(("rowBytes is %d, width %d, out_space %x, space %x\n", out_rowbytes, width, out_space, space));
|
||||||
err = outDestination->Write(&hdr, sizeof(hdr));
|
err = outDestination->Write(&hdr, sizeof(hdr));
|
||||||
dprintf(("PPMTranslator: Write() returns %lx\n", err));
|
dprintf(("PPMTranslator: Write() returns %" B_PRIx32 "\n", err));
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
{
|
{
|
||||||
BBitmap * map = new BBitmap(BRect(0,0,width-1,height-1), out_space);
|
BBitmap * map = new BBitmap(BRect(0,0,width-1,height-1), out_space);
|
||||||
printf("map rb = %ld\n", map->BytesPerRow());
|
printf("map rb = %" B_PRId32 "\n", map->BytesPerRow());
|
||||||
delete map;
|
delete map;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -591,7 +591,7 @@ void MediaRoutingView::MessageReceived(
|
|||||||
status_t err = manager->roster->StartTimeSource(ref->node(), when);
|
status_t err = manager->roster->StartTimeSource(ref->node(), when);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"! StartTimeSource(%ld): '%s'\n",
|
"! StartTimeSource(%" B_PRId32 "): '%s'\n",
|
||||||
ref->id(), strerror(err)));
|
ref->id(), strerror(err)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -610,7 +610,7 @@ void MediaRoutingView::MessageReceived(
|
|||||||
status_t err = manager->roster->StopTimeSource(ref->node(), when);
|
status_t err = manager->roster->StopTimeSource(ref->node(), when);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"! StopTimeSource(%ld): '%s'\n",
|
"! StopTimeSource(%" B_PRId32 "): '%s'\n",
|
||||||
ref->id(), strerror(err)));
|
ref->id(), strerror(err)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1154,8 +1154,8 @@ status_t MediaRoutingView::importStateFor(
|
|||||||
err = archive->FindMessage("panel", archiveIndex, &m);
|
err = archive->FindMessage("panel", archiveIndex, &m);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! MediaRoutingView::importStateFor(): missing panel %ld\n",
|
"!!! MediaRoutingView::importStateFor(): missing panel %"
|
||||||
archiveIndex));
|
B_PRId32 "\n", archiveIndex));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1217,7 +1217,7 @@ status_t MediaRoutingView::exportStateFor(
|
|||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! MediaRoutingView::exportStateFor():\n"
|
"!!! MediaRoutingView::exportStateFor():\n"
|
||||||
" no panel for node %ld\n",
|
" no panel for node %" B_PRId32 "\n",
|
||||||
context->nodeAt(n)));
|
context->nodeAt(n)));
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -743,7 +743,7 @@ void NodeGroup::MessageReceived(
|
|||||||
runMode > BMediaNode::B_RECORDING) {
|
runMode > BMediaNode::B_RECORDING) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeGroup::MessageReceived(M_SET_RUN_MODE):\n"
|
"* NodeGroup::MessageReceived(M_SET_RUN_MODE):\n"
|
||||||
" invalid run mode (%ld)\n", runMode));
|
" invalid run mode (%" B_PRIu32 ")\n", runMode));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1180,7 +1180,7 @@ status_t NodeGroup::_start() {
|
|||||||
|
|
||||||
offset += s_rosterLatency;
|
offset += s_rosterLatency;
|
||||||
PRINT((
|
PRINT((
|
||||||
"- offset: %Ld\n", offset));
|
"- offset: %" B_PRIdBIGTIME "\n", offset));
|
||||||
|
|
||||||
// * Seek all nodes (in case one or more failed to preroll)
|
// * Seek all nodes (in case one or more failed to preroll)
|
||||||
|
|
||||||
@@ -1190,7 +1190,7 @@ status_t NodeGroup::_start() {
|
|||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"! NodeGroup('%s')::_start():\n"
|
"! NodeGroup('%s')::_start():\n"
|
||||||
" ref('%s')->_seekStopped(%Ld) failed:\n"
|
" ref('%s')->_seekStopped(%" B_PRIdBIGTIME ") failed:\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
name(), (*it)->name(), m_startPosition,
|
name(), (*it)->name(), m_startPosition,
|
||||||
strerror(err)));
|
strerror(err)));
|
||||||
@@ -1217,7 +1217,7 @@ status_t NodeGroup::_start() {
|
|||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"! NodeGroup('%s')::_start():\n"
|
"! NodeGroup('%s')::_start():\n"
|
||||||
" ref('%s')->_start(%Ld) failed:\n"
|
" ref('%s')->_start(%" B_PRIdBIGTIME ") failed:\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
name(), (*it)->name(), when,
|
name(), (*it)->name(), when,
|
||||||
strerror(err)));
|
strerror(err)));
|
||||||
@@ -1306,7 +1306,7 @@ status_t NodeGroup::_roll() {
|
|||||||
|
|
||||||
offset += s_rosterLatency;
|
offset += s_rosterLatency;
|
||||||
PRINT((
|
PRINT((
|
||||||
"- offset: %Ld\n", offset));
|
"- offset: %" B_PRIdBIGTIME "\n", offset));
|
||||||
|
|
||||||
ASSERT(m_timeSourceObj);
|
ASSERT(m_timeSourceObj);
|
||||||
tpStart = m_timeSourceObj->Now() + offset;
|
tpStart = m_timeSourceObj->Now() + offset;
|
||||||
@@ -1605,7 +1605,7 @@ void NodeGroup::_cycleThread() {
|
|||||||
// +++++ adjust to compensate !!!
|
// +++++ adjust to compensate !!!
|
||||||
PRINT((
|
PRINT((
|
||||||
"*** NodeGroup::_cycleThread(): LATE\n"
|
"*** NodeGroup::_cycleThread(): LATE\n"
|
||||||
" by %Ld\n", -timeout));
|
" by %" B_PRIdBIGTIME "\n", -timeout));
|
||||||
}
|
}
|
||||||
|
|
||||||
// +++++ if timeout is very short, spin until the target time arrives
|
// +++++ if timeout is very short, spin until the target time arrives
|
||||||
@@ -1658,7 +1658,8 @@ void NodeGroup::_cycleThread() {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeGroup::_cycleThread(): unknown message code '%ld'\n", code));
|
"* NodeGroup::_cycleThread(): unknown message code '%"
|
||||||
|
B_PRId32 "'\n", code));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} // while(!done)
|
} // while(!done)
|
||||||
|
|||||||
@@ -571,8 +571,8 @@ bool NodeManager::findRoute(
|
|||||||
err = getNodeRef(nodeA, &ref);
|
err = getNodeRef(nodeA, &ref);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! NodeManager::findRoute(%ld, %ld): no ref for node %ld\n",
|
"!!! NodeManager::findRoute(%" B_PRId32 ", %" B_PRId32
|
||||||
nodeA, nodeB, nodeA));
|
"): no ref for node %" B_PRId32 "\n", nodeA, nodeB, nodeA));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -923,8 +923,8 @@ status_t NodeManager::splitGroup(
|
|||||||
// ensure that no route exists from insideNode to outsideNode
|
// ensure that no route exists from insideNode to outsideNode
|
||||||
if(findRoute(insideNode->id(), outsideNode->id())) {
|
if(findRoute(insideNode->id(), outsideNode->id())) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! NodeManager::splitGroup(): route exists from %ld to %ld\n",
|
"!!! NodeManager::splitGroup(): route exists from %" B_PRId32
|
||||||
insideNode->id(), outsideNode->id()));
|
" to %" B_PRId32 "\n", insideNode->id(), outsideNode->id()));
|
||||||
return B_NOT_ALLOWED;
|
return B_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -936,8 +936,8 @@ status_t NodeManager::splitGroup(
|
|||||||
}
|
}
|
||||||
if(oldGroup != outsideNode->group()) {
|
if(oldGroup != outsideNode->group()) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! NodeManager::splitGroup(): mismatched groups for %ld and %ld\n",
|
"!!! NodeManager::splitGroup(): mismatched groups for %" B_PRId32
|
||||||
insideNode->id(), outsideNode->id()));
|
" and %" B_PRId32 "\n", insideNode->id(), outsideNode->id()));
|
||||||
return B_NOT_ALLOWED;
|
return B_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1193,10 +1193,10 @@ status_t NodeManager::connect(
|
|||||||
|
|
||||||
D_METHOD((
|
D_METHOD((
|
||||||
"! creating connection:\n"
|
"! creating connection:\n"
|
||||||
" source id: %ld\n"
|
" source id: %" B_PRId32 "\n"
|
||||||
" source port: %ld\n"
|
" source port: %" B_PRId32 "\n"
|
||||||
" dest id: %ld\n"
|
" dest id: %" B_PRId32 "\n"
|
||||||
" dest port: %ld\n",
|
" dest port: %" B_PRId32 "\n",
|
||||||
finalOutput.source.id, finalOutput.source.port,
|
finalOutput.source.id, finalOutput.source.port,
|
||||||
finalInput.destination.id, finalInput.destination.port));
|
finalInput.destination.id, finalInput.destination.port));
|
||||||
|
|
||||||
@@ -1316,7 +1316,7 @@ status_t NodeManager::disconnect(
|
|||||||
if(connection.flags() & Connection::LOCKED) {
|
if(connection.flags() & Connection::LOCKED) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"NodeManager::disconnect(): connection locked:\n"
|
"NodeManager::disconnect(): connection locked:\n"
|
||||||
" %ld:%s -> %ld:%s\n",
|
" %" B_PRId32 ":%s -> %" B_PRId32 ":%s\n",
|
||||||
connection.sourceNode(),
|
connection.sourceNode(),
|
||||||
connection.outputName(),
|
connection.outputName(),
|
||||||
connection.destinationNode(),
|
connection.destinationNode(),
|
||||||
@@ -1326,12 +1326,12 @@ status_t NodeManager::disconnect(
|
|||||||
|
|
||||||
D_METHOD((
|
D_METHOD((
|
||||||
"! breaking connection:\n"
|
"! breaking connection:\n"
|
||||||
" source node: %ld\n"
|
" source node: %" B_PRId32 "\n"
|
||||||
" source id: %ld\n"
|
" source id: %" B_PRId32 "\n"
|
||||||
" source port: %ld\n"
|
" source port: %" B_PRId32 "\n"
|
||||||
" dest node: %ld\n"
|
" dest node: %" B_PRId32 "\n"
|
||||||
" dest id: %ld\n"
|
" dest id: %" B_PRId32 "\n"
|
||||||
" dest port: %ld\n",
|
" dest port: %" B_PRId32 "\n",
|
||||||
connection.sourceNode(),
|
connection.sourceNode(),
|
||||||
connection.source().id, connection.source().port,
|
connection.source().id, connection.source().port,
|
||||||
connection.destinationNode(),
|
connection.destinationNode(),
|
||||||
@@ -1879,7 +1879,7 @@ void NodeManager::_removeGroup(
|
|||||||
// precondition: group in set
|
// precondition: group in set
|
||||||
if(it == m_nodeGroupSet.end()) {
|
if(it == m_nodeGroupSet.end()) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeManager::_removeGroup(%ld): group not in set.\n",
|
"* NodeManager::_removeGroup(%" B_PRId32 "): group not in set.\n",
|
||||||
group->id()));
|
group->id()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1920,7 +1920,7 @@ inline status_t NodeManager::_handleNodesCreated(
|
|||||||
}
|
}
|
||||||
|
|
||||||
D_METHOD((
|
D_METHOD((
|
||||||
"NodeManager::_handleNodesCreated(): %d nodes\n",
|
"NodeManager::_handleNodesCreated(): %" B_PRId32 " nodes\n",
|
||||||
count));
|
count));
|
||||||
|
|
||||||
// * Create NodeRef instances for the listed nodes.
|
// * Create NodeRef instances for the listed nodes.
|
||||||
@@ -1952,7 +1952,8 @@ inline status_t NodeManager::_handleNodesCreated(
|
|||||||
err = roster->GetNodeFor(id, &node);
|
err = roster->GetNodeFor(id, &node);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeManager::_handleNodesCreated(): roster->GetNodeFor(%ld) failed:\n"
|
"* NodeManager::_handleNodesCreated(): roster->GetNodeFor(%"
|
||||||
|
B_PRId32 ") failed:\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
id, strerror(err)));
|
id, strerror(err)));
|
||||||
continue;
|
continue;
|
||||||
@@ -1990,7 +1991,8 @@ inline status_t NodeManager::_handleNodesCreated(
|
|||||||
err = roster->ReleaseNode(node);
|
err = roster->ReleaseNode(node);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeManager::_handleNodesCreated(): roster->ReleaseNode(%ld) failed:\n"
|
"* NodeManager::_handleNodesCreated(): roster->ReleaseNode(%"
|
||||||
|
B_PRId32 ") failed:\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
id, strerror(err)));
|
id, strerror(err)));
|
||||||
}
|
}
|
||||||
@@ -2084,10 +2086,10 @@ inline status_t NodeManager::_handleNodesCreated(
|
|||||||
"!!! NodeManager::_handleNodesCreated():\n"
|
"!!! NodeManager::_handleNodesCreated():\n"
|
||||||
" input/output mismatch for connection\n"
|
" input/output mismatch for connection\n"
|
||||||
" '%s' (%s) -> '%s' (%s)\n"
|
" '%s' (%s) -> '%s' (%s)\n"
|
||||||
" input.source: port %ld, ID %ld\n"
|
" input.source: port %" B_PRId32 ", ID %" B_PRId32 "\n"
|
||||||
" output.source: port %ld, ID %ld\n"
|
" output.source: port %" B_PRId32 ", ID %" B_PRId32 "\n"
|
||||||
" input.destination: port %ld, ID %ld\n"
|
" input.destination: port %" B_PRId32 ", ID %" B_PRId32 "\n"
|
||||||
" output.destination: port %ld, ID %ld\n\n",
|
" output.destination: port %" B_PRId32 ", ID %" B_PRId32 "\n\n",
|
||||||
sourceRef->name(), output.name,
|
sourceRef->name(), output.name,
|
||||||
destRef->name(), input.name,
|
destRef->name(), input.name,
|
||||||
input.source.port, input.source.id,
|
input.source.port, input.source.id,
|
||||||
@@ -2175,7 +2177,8 @@ inline void NodeManager::_handleNodesDeleted(
|
|||||||
err = getNodeRef(id, &ref);
|
err = getNodeRef(id, &ref);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeManager::_handleNodesDeleted(): getNodeRef(%ld) failed\n"
|
"* NodeManager::_handleNodesDeleted(): getNodeRef(%" B_PRId32
|
||||||
|
") failed\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
id, strerror(err)));
|
id, strerror(err)));
|
||||||
continue;
|
continue;
|
||||||
@@ -2336,7 +2339,7 @@ inline void NodeManager::_handleConnectionBroken(
|
|||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeManager::_handleConnectionBroken(): connection not found:\n"
|
"* NodeManager::_handleConnectionBroken(): connection not found:\n"
|
||||||
" %ld:%ld\n",
|
" %" B_PRId32 ":%" B_PRId32 "\n",
|
||||||
source.port, source.id));
|
source.port, source.id));
|
||||||
|
|
||||||
// add empty entry to message
|
// add empty entry to message
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ bigtime_t NodeRef::calculateRecordingModeDelay() {
|
|||||||
node(), &latency);
|
node(), &latency);
|
||||||
|
|
||||||
PRINT((
|
PRINT((
|
||||||
" %Ld\n", latency));
|
" %" B_PRIdBIGTIME "\n", latency));
|
||||||
|
|
||||||
return latency; // +++++ stab in the dark 28sep99
|
return latency; // +++++ stab in the dark 28sep99
|
||||||
// return maxBufferDur + latency;
|
// return maxBufferDur + latency;
|
||||||
@@ -669,7 +669,7 @@ status_t NodeRef::releaseNode() {
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! ReleaseNode(%ld) failed:\n"
|
"!!! ReleaseNode(%" B_PRId32 ") failed:\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
m_info.node.node,
|
m_info.node.node,
|
||||||
strerror(err)));
|
strerror(err)));
|
||||||
@@ -683,7 +683,8 @@ status_t NodeRef::releaseNode() {
|
|||||||
err = AddOnHost::ReleaseInternalNode(m_info);
|
err = AddOnHost::ReleaseInternalNode(m_info);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! AddOnHost::ReleaseInternalNode(%ld) failed:\n"
|
"!!! AddOnHost::ReleaseInternalNode(%" B_PRId32
|
||||||
|
") failed:\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
m_info.node.node,
|
m_info.node.node,
|
||||||
strerror(err)));
|
strerror(err)));
|
||||||
@@ -1498,7 +1499,8 @@ NodeRef::NodeRef(
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! NodeRef(): BMediaRoster::GetLiveNodeInfo(%ld) failed:\n"
|
"!!! NodeRef(): BMediaRoster::GetLiveNodeInfo(%" B_PRId32
|
||||||
|
") failed:\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
node.node,
|
node.node,
|
||||||
strerror(err)));
|
strerror(err)));
|
||||||
@@ -1669,7 +1671,7 @@ status_t NodeRef::_setTimeSource(
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"* NodeRef('%s')::_setTimeSource(%ld):\n"
|
"* NodeRef('%s')::_setTimeSource(%" B_PRId32 "):\n"
|
||||||
" SetTimeSourceFor() failed: %s\n",
|
" SetTimeSourceFor() failed: %s\n",
|
||||||
name(), timeSourceID, strerror(err)));
|
name(), timeSourceID, strerror(err)));
|
||||||
}
|
}
|
||||||
@@ -1709,7 +1711,8 @@ status_t NodeRef::_setRunMode(
|
|||||||
node(), delay, m);
|
node(), delay, m);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"NodeRef('%s')::_setRunMode(): SetProducerRunModeDelay(%Ld) failed: %s\n",
|
"NodeRef('%s')::_setRunMode(): SetProducerRunModeDelay(%"
|
||||||
|
B_PRIdBIGTIME ") failed: %s\n",
|
||||||
name(), delay, strerror(err)));
|
name(), delay, strerror(err)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1773,7 +1776,8 @@ status_t NodeRef::_preroll(
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"*** NodeRef('%s')::_preroll(%Ld): BMediaRoster::SeekNode():\n"
|
"*** NodeRef('%s')::_preroll(%" B_PRIdBIGTIME
|
||||||
|
"): BMediaRoster::SeekNode():\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
name(), position, strerror(err)));
|
name(), position, strerror(err)));
|
||||||
return err;
|
return err;
|
||||||
@@ -1788,7 +1792,8 @@ status_t NodeRef::_preroll(
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"*** NodeRef('%s')::_preroll(%Ld): BMediaRoster::PrerollNode():\n"
|
"*** NodeRef('%s')::_preroll(%" B_PRIdBIGTIME
|
||||||
|
"): BMediaRoster::PrerollNode():\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
name(), position, strerror(err)));
|
name(), position, strerror(err)));
|
||||||
return err;
|
return err;
|
||||||
@@ -1811,7 +1816,7 @@ status_t NodeRef::_seek(
|
|||||||
assert_locked(this);
|
assert_locked(this);
|
||||||
|
|
||||||
D_METHOD((
|
D_METHOD((
|
||||||
"NodeRef('%s')::_seek(to %Ld, at %Ld)\n",
|
"NodeRef('%s')::_seek(to %" B_PRIdBIGTIME ", at %" B_PRIdBIGTIME ")\n",
|
||||||
name(), position, when));
|
name(), position, when));
|
||||||
|
|
||||||
if(m_flags & NO_SEEK)
|
if(m_flags & NO_SEEK)
|
||||||
@@ -1828,7 +1833,8 @@ status_t NodeRef::_seek(
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"*** NodeRef('%s')::_seek(to %Ld, at %Ld): BMediaRoster::SeekNode():\n"
|
"*** NodeRef('%s')::_seek(to %" B_PRIdBIGTIME ", at %"
|
||||||
|
B_PRIdBIGTIME "): BMediaRoster::SeekNode():\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
name(), position, when, strerror(err)));
|
name(), position, when, strerror(err)));
|
||||||
return err;
|
return err;
|
||||||
@@ -1900,7 +1906,7 @@ status_t NodeRef::_start(
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
" * StartNode(%ld) failed: '%s'\n",
|
" * StartNode(%" B_PRId32 ") failed: '%s'\n",
|
||||||
id(), strerror(err)));
|
id(), strerror(err)));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@@ -1984,7 +1990,7 @@ status_t NodeRef::_roll(
|
|||||||
m_group->m_transportState == NodeGroup::TRANSPORT_RUNNING ||
|
m_group->m_transportState == NodeGroup::TRANSPORT_RUNNING ||
|
||||||
m_group->m_transportState == NodeGroup::TRANSPORT_STARTING);
|
m_group->m_transportState == NodeGroup::TRANSPORT_STARTING);
|
||||||
|
|
||||||
D_ROSTER(("# roster->RollNode(%ld)\n", id()));
|
D_ROSTER(("# roster->RollNode(%" B_PRId32 ")\n", id()));
|
||||||
if(m_flags & NO_SEEK)
|
if(m_flags & NO_SEEK)
|
||||||
err = BMediaRoster::Roster()->RollNode(
|
err = BMediaRoster::Roster()->RollNode(
|
||||||
node(), start, stop);
|
node(), start, stop);
|
||||||
@@ -1994,8 +2000,9 @@ status_t NodeRef::_roll(
|
|||||||
|
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"NodeRef('%s')::_roll(%Ld to %Ld, from %Ld)\n"
|
"NodeRef('%s')::_roll(%" B_PRIdBIGTIME " to %" B_PRIdBIGTIME
|
||||||
"!!! BMediaRoster::RollNode(%ld) failed: '%s'\n",
|
", from %" B_PRIdBIGTIME ")\n"
|
||||||
|
"!!! BMediaRoster::RollNode(%" B_PRId32 ") failed: '%s'\n",
|
||||||
name(), start, stop, position, id(), strerror(err)));
|
name(), start, stop, position, id(), strerror(err)));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ NodeSyncThread::~NodeSyncThread() {
|
|||||||
err = kill_thread(m_thread);
|
err = kill_thread(m_thread);
|
||||||
if(err < B_OK)
|
if(err < B_OK)
|
||||||
PRINT((
|
PRINT((
|
||||||
"! ~NodeSyncThread(): kill_thread(%ld):\n"
|
"! ~NodeSyncThread(): kill_thread(%" B_PRId32 "):\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
m_thread,
|
m_thread,
|
||||||
strerror(err)));
|
strerror(err)));
|
||||||
@@ -64,7 +64,7 @@ NodeSyncThread::~NodeSyncThread() {
|
|||||||
err = delete_port(m_port);
|
err = delete_port(m_port);
|
||||||
if(err < B_OK)
|
if(err < B_OK)
|
||||||
PRINT((
|
PRINT((
|
||||||
"! ~NodeSyncThread(): delete_port(%ld):\n"
|
"! ~NodeSyncThread(): delete_port(%" B_PRId32 "):\n"
|
||||||
" %s\n",
|
" %s\n",
|
||||||
m_port,
|
m_port,
|
||||||
strerror(err)));
|
strerror(err)));
|
||||||
@@ -173,8 +173,8 @@ void NodeSyncThread::_sync() {
|
|||||||
|
|
||||||
if(code != M_TRIGGER) {
|
if(code != M_TRIGGER) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"! NodeSyncThread::sync(): unknown message code %ld\n",
|
"! NodeSyncThread::sync(): unknown message code %" B_PRId32
|
||||||
code));
|
"\n", code));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ status_t LiveNodeIO::getNode(
|
|||||||
outNode);
|
outNode);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! No node found named '%s' with kinds %Ld\n",
|
"!!! No node found named '%s' with kinds %" B_PRId64 "\n",
|
||||||
name(),
|
name(),
|
||||||
kind()));
|
kind()));
|
||||||
return B_NAME_NOT_FOUND;
|
return B_NAME_NOT_FOUND;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ status_t NodeSetIOContext::addNode(
|
|||||||
(*it).first.Length() &&
|
(*it).first.Length() &&
|
||||||
strcmp(key, (*it).first.String()) != 0) {
|
strcmp(key, (*it).first.String()) != 0) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! NodeSetIOContext::addNode(%ld, '%s'):\n"
|
"!!! NodeSetIOContext::addNode(%" B_PRId32 ", '%s'):\n"
|
||||||
" found matching node with key '%s'!\n",
|
" found matching node with key '%s'!\n",
|
||||||
node, key, (*it).first.String()));
|
node, key, (*it).first.String()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,8 +161,8 @@ status_t __CORTEX_NAMESPACE__ _get_node_signature(
|
|||||||
status_t err = manager->getNodeRef(node, &ref);
|
status_t err = manager->getNodeRef(node, &ref);
|
||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"!!! ConnectionIO::_getNodeSignature(): node %ld not found\n",
|
"!!! ConnectionIO::_getNodeSignature(): node %" B_PRId32
|
||||||
node));
|
" not found\n", node));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ status_t __CORTEX_NAMESPACE__ _match_node_signature(
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
for(int32 n = 0; n < count; ++n) {
|
for(int32 n = 0; n < count; ++n) {
|
||||||
PRINT(("# %ld\n", buffer[n].node.node));
|
PRINT(("# %" B_PRId32 "\n", buffer[n].node.node));
|
||||||
if((buffer[n].node.kind & kind) != kind) {
|
if((buffer[n].node.kind & kind) != kind) {
|
||||||
PRINT(("# - kind mismatch\n"));
|
PRINT(("# - kind mismatch\n"));
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ FlangerNode::Connected(const media_source& source,
|
|||||||
media_input* poInput)
|
media_input* poInput)
|
||||||
{
|
{
|
||||||
PRINT(("FlangerNode::Connected()\n"
|
PRINT(("FlangerNode::Connected()\n"
|
||||||
"\tto source %ld\n", source.id));
|
"\tto source %" B_PRId32 "\n", source.id));
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
if(destination != m_input.destination) {
|
if(destination != m_input.destination) {
|
||||||
@@ -377,13 +377,13 @@ void FlangerNode::Disconnected(
|
|||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if(m_input.source != source) {
|
if(m_input.source != source) {
|
||||||
PRINT(("\tsource mismatch: expected ID %ld, got %ld\n",
|
PRINT(("\tsource mismatch: expected ID %" B_PRId32 ", got %" B_PRId32
|
||||||
m_input.source.id, source.id));
|
"\n", m_input.source.id, source.id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(destination != m_input.destination) {
|
if(destination != m_input.destination) {
|
||||||
PRINT(("\tdestination mismatch: expected ID %ld, got %ld\n",
|
PRINT(("\tdestination mismatch: expected ID %" B_PRId32 ", got %"
|
||||||
m_input.destination.id, destination.id));
|
B_PRId32 "\n", m_input.destination.id, destination.id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ status_t FlangerNode::GetLatencyFor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
*poLatency = m_downstreamLatency + m_processingLatency;
|
*poLatency = m_downstreamLatency + m_processingLatency;
|
||||||
PRINT(("\treturning %Ld\n", *poLatency));
|
PRINT(("\treturning %" B_PRIdBIGTIME "\n", *poLatency));
|
||||||
*poTimeSource = TimeSource()->ID();
|
*poTimeSource = TimeSource()->ID();
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -550,14 +550,14 @@ void FlangerNode::Connect(
|
|||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT(("\t!!! FindLatencyFor(): %s\n", strerror(err)));
|
PRINT(("\t!!! FindLatencyFor(): %s\n", strerror(err)));
|
||||||
}
|
}
|
||||||
PRINT(("\tdownstream latency = %Ld\n", m_downstreamLatency));
|
PRINT(("\tdownstream latency = %" B_PRIdBIGTIME "\n", m_downstreamLatency));
|
||||||
|
|
||||||
// prepare the filter
|
// prepare the filter
|
||||||
initFilter();
|
initFilter();
|
||||||
|
|
||||||
// figure processing time
|
// figure processing time
|
||||||
m_processingLatency = calcProcessingLatency();
|
m_processingLatency = calcProcessingLatency();
|
||||||
PRINT(("\tprocessing latency = %Ld\n", m_processingLatency));
|
PRINT(("\tprocessing latency = %" B_PRIdBIGTIME "\n", m_processingLatency));
|
||||||
|
|
||||||
// store summed latency
|
// store summed latency
|
||||||
SetEventLatency(m_downstreamLatency + m_processingLatency);
|
SetEventLatency(m_downstreamLatency + m_processingLatency);
|
||||||
@@ -685,7 +685,7 @@ status_t FlangerNode::GetLatency(
|
|||||||
|
|
||||||
PRINT(("FlangerNode::GetLatency()\n"));
|
PRINT(("FlangerNode::GetLatency()\n"));
|
||||||
*poLatency = EventLatency() + SchedulingLatency();
|
*poLatency = EventLatency() + SchedulingLatency();
|
||||||
PRINT(("\treturning %Ld\n", *poLatency));
|
PRINT(("\treturning %" B_PRIdBIGTIME "\n", *poLatency));
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -747,8 +747,8 @@ void FlangerNode::LateNoticeReceived(
|
|||||||
bigtime_t tpWhen) {
|
bigtime_t tpWhen) {
|
||||||
|
|
||||||
PRINT(("FlangerNode::LateNoticeReceived()\n"
|
PRINT(("FlangerNode::LateNoticeReceived()\n"
|
||||||
"\thowLate == %Ld\n"
|
"\thowLate == %" B_PRIdBIGTIME "\n"
|
||||||
"\twhen == %Ld\n", howLate, tpWhen));
|
"\twhen == %" B_PRIdBIGTIME "\n", howLate, tpWhen));
|
||||||
|
|
||||||
if(source != m_output.source) {
|
if(source != m_output.source) {
|
||||||
PRINT(("\tBad source.\n"));
|
PRINT(("\tBad source.\n"));
|
||||||
|
|||||||
@@ -582,7 +582,7 @@ status_t AudioFilterNode::Connected(
|
|||||||
media_input* outInput) {
|
media_input* outInput) {
|
||||||
|
|
||||||
PRINT(("AudioFilterNode::Connected()\n"
|
PRINT(("AudioFilterNode::Connected()\n"
|
||||||
"\tto source %ld\n", source.id));
|
"\tto source %" B_PRId32 "\n", source.id));
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
if(destination != m_input.destination) {
|
if(destination != m_input.destination) {
|
||||||
@@ -613,13 +613,13 @@ void AudioFilterNode::Disconnected(
|
|||||||
|
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if(m_input.source != source) {
|
if(m_input.source != source) {
|
||||||
PRINT(("\tsource mismatch: expected ID %ld, got %ld\n",
|
PRINT(("\tsource mismatch: expected ID %" B_PRId32 ", got %" B_PRId32
|
||||||
m_input.source.id, source.id));
|
"\n", m_input.source.id, source.id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(destination != m_input.destination) {
|
if(destination != m_input.destination) {
|
||||||
PRINT(("\tdestination mismatch: expected ID %ld, got %ld\n",
|
PRINT(("\tdestination mismatch: expected ID %" B_PRId32 ", got %"
|
||||||
m_input.destination.id, destination.id));
|
B_PRId32 "\n", m_input.destination.id, destination.id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -684,7 +684,7 @@ status_t AudioFilterNode::GetLatencyFor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
*outLatency = m_downstreamLatency + m_processingLatency;
|
*outLatency = m_downstreamLatency + m_processingLatency;
|
||||||
PRINT(("\treturning %Ld\n", *outLatency));
|
PRINT(("\treturning %" B_PRIdBIGTIME "\n", *outLatency));
|
||||||
*outTimeSource = TimeSource()->ID();
|
*outTimeSource = TimeSource()->ID();
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -707,7 +707,8 @@ void AudioFilterNode::ProducerDataStatus(
|
|||||||
int32 status,
|
int32 status,
|
||||||
bigtime_t tpWhen) {
|
bigtime_t tpWhen) {
|
||||||
|
|
||||||
PRINT(("AudioFilterNode::ProducerDataStatus(%ld at %Ld)\n", status, tpWhen));
|
PRINT(("AudioFilterNode::ProducerDataStatus(%" B_PRId32 " at %"
|
||||||
|
B_PRIdBIGTIME ")\n", status, tpWhen));
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
if(destination != m_input.destination) {
|
if(destination != m_input.destination) {
|
||||||
@@ -804,7 +805,7 @@ void AudioFilterNode::Connect(
|
|||||||
if(err < B_OK) {
|
if(err < B_OK) {
|
||||||
PRINT(("\t!!! FindLatencyFor(): %s\n", strerror(err)));
|
PRINT(("\t!!! FindLatencyFor(): %s\n", strerror(err)));
|
||||||
}
|
}
|
||||||
PRINT(("\tdownstream latency = %Ld\n", m_downstreamLatency));
|
PRINT(("\tdownstream latency = %" B_PRIdBIGTIME "\n", m_downstreamLatency));
|
||||||
|
|
||||||
// // prepare the filter
|
// // prepare the filter
|
||||||
// initFilter();
|
// initFilter();
|
||||||
@@ -984,7 +985,7 @@ status_t AudioFilterNode::GetLatency(
|
|||||||
|
|
||||||
PRINT(("AudioFilterNode::GetLatency()\n"));
|
PRINT(("AudioFilterNode::GetLatency()\n"));
|
||||||
*outLatency = EventLatency() + SchedulingLatency();
|
*outLatency = EventLatency() + SchedulingLatency();
|
||||||
PRINT(("\treturning %Ld\n", *outLatency));
|
PRINT(("\treturning %" B_PRIdBIGTIME "\n", *outLatency));
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -1047,8 +1048,8 @@ void AudioFilterNode::LateNoticeReceived(
|
|||||||
bigtime_t tpWhen) {
|
bigtime_t tpWhen) {
|
||||||
|
|
||||||
PRINT(("AudioFilterNode::LateNoticeReceived()\n"
|
PRINT(("AudioFilterNode::LateNoticeReceived()\n"
|
||||||
"\thowLate == %Ld\n"
|
"\thowLate == %" B_PRIdBIGTIME "\n"
|
||||||
"\twhen == %Ld\n", howLate, tpWhen));
|
"\twhen == %" B_PRIdBIGTIME "\n", howLate, tpWhen));
|
||||||
|
|
||||||
if(source != m_output.source) {
|
if(source != m_output.source) {
|
||||||
PRINT(("\tBad source.\n"));
|
PRINT(("\tBad source.\n"));
|
||||||
@@ -1362,7 +1363,7 @@ void AudioFilterNode::updateOperation() {
|
|||||||
// do performance tests (what if I'm running? +++++)
|
// do performance tests (what if I'm running? +++++)
|
||||||
|
|
||||||
m_processingLatency = calcProcessingLatency();
|
m_processingLatency = calcProcessingLatency();
|
||||||
PRINT(("\tprocessing latency = %Ld\n", m_processingLatency));
|
PRINT(("\tprocessing latency = %" B_PRIdBIGTIME "\n", m_processingLatency));
|
||||||
|
|
||||||
// store summed latency
|
// store summed latency
|
||||||
SetEventLatency(m_downstreamLatency + m_processingLatency);
|
SetEventLatency(m_downstreamLatency + m_processingLatency);
|
||||||
@@ -1435,7 +1436,7 @@ void AudioFilterNode::updateBufferGroup() {
|
|||||||
// create buffer group
|
// create buffer group
|
||||||
PRINT((
|
PRINT((
|
||||||
"##### AudioFilterNode::updateBufferGroup():\n"
|
"##### AudioFilterNode::updateBufferGroup():\n"
|
||||||
"##### creating %ld buffers of size %ld\n",
|
"##### creating %" B_PRId32 " buffers of size %" B_PRIuSIZE "\n",
|
||||||
bufferCount, m_output.format.u.raw_audio.buffer_size));
|
bufferCount, m_output.format.u.raw_audio.buffer_size));
|
||||||
|
|
||||||
m_bufferGroup = new BBufferGroup(
|
m_bufferGroup = new BBufferGroup(
|
||||||
|
|||||||
@@ -115,7 +115,8 @@ public: // operations
|
|||||||
if(wait) {
|
if(wait) {
|
||||||
status_t ret;
|
status_t ret;
|
||||||
while(wait_for_thread(thread, &ret) == B_INTERRUPTED) {
|
while(wait_for_thread(thread, &ret) == B_INTERRUPTED) {
|
||||||
PRINT(("stopping thread %ld: B_INTERRUPTED\n", thread));
|
PRINT(("stopping thread %" B_PRId32 ": B_INTERRUPTED\n",
|
||||||
|
thread));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ status_t ObservableHandler::release() {
|
|||||||
ObservableHandler::~ObservableHandler() {
|
ObservableHandler::~ObservableHandler() {
|
||||||
if(CountTargets()) {
|
if(CountTargets()) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"*** ~ObservableHandler() '%s': %ld observers remain\n",
|
"*** ~ObservableHandler() '%s': %" B_PRId32 " observers remain\n",
|
||||||
Name(), CountTargets()));
|
Name(), CountTargets()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ status_t ObservableLooper::release() {
|
|||||||
ObservableLooper::~ObservableLooper() {
|
ObservableLooper::~ObservableLooper() {
|
||||||
if(CountTargets()) {
|
if(CountTargets()) {
|
||||||
PRINT((
|
PRINT((
|
||||||
"*** ~ObservableLooper() '%s': %ld observers remain\n",
|
"*** ~ObservableLooper() '%s': %" B_PRId32 " observers remain\n",
|
||||||
Name(), CountTargets()));
|
Name(), CountTargets()));
|
||||||
}
|
}
|
||||||
if(m_executioner)
|
if(m_executioner)
|
||||||
|
|||||||
@@ -212,8 +212,8 @@ PatchView::HandleMidiEvent(BMessage* msg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("MIDI Roster Event B_MIDI_REGISTERED: id=%ld, type=%s\n",
|
PRINT(("MIDI Roster Event B_MIDI_REGISTERED: id=%" B_PRId32
|
||||||
id, type));
|
", type=%s\n", id, type));
|
||||||
if (strcmp(type, "producer") == 0)
|
if (strcmp(type, "producer") == 0)
|
||||||
AddProducer(id);
|
AddProducer(id);
|
||||||
else if (strcmp(type, "consumer") == 0)
|
else if (strcmp(type, "consumer") == 0)
|
||||||
@@ -236,8 +236,8 @@ PatchView::HandleMidiEvent(BMessage* msg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("MIDI Roster Event B_MIDI_UNREGISTERED: id=%ld, type=%s\n",
|
PRINT(("MIDI Roster Event B_MIDI_UNREGISTERED: id=%" B_PRId32
|
||||||
id, type));
|
", type=%s\n", id, type));
|
||||||
if (strcmp(type, "producer") == 0)
|
if (strcmp(type, "producer") == 0)
|
||||||
RemoveProducer(id);
|
RemoveProducer(id);
|
||||||
else if (strcmp(type, "consumer") == 0)
|
else if (strcmp(type, "consumer") == 0)
|
||||||
@@ -267,8 +267,8 @@ PatchView::HandleMidiEvent(BMessage* msg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT(("MIDI Roster Event B_MIDI_CHANGED_PROPERTIES: id=%ld, type=%s\n",
|
PRINT(("MIDI Roster Event B_MIDI_CHANGED_PROPERTIES: id=%" B_PRId32
|
||||||
id, type));
|
", type=%s\n", id, type));
|
||||||
if (strcmp(type, "producer") == 0)
|
if (strcmp(type, "producer") == 0)
|
||||||
UpdateProducerProps(id, &props);
|
UpdateProducerProps(id, &props);
|
||||||
else if (strcmp(type, "consumer") == 0)
|
else if (strcmp(type, "consumer") == 0)
|
||||||
@@ -295,8 +295,8 @@ PatchView::HandleMidiEvent(BMessage* msg)
|
|||||||
" field not found in B_MIDI_CONNECTED\n"));
|
" field not found in B_MIDI_CONNECTED\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
PRINT(("MIDI Roster Event B_MIDI_CONNECTED: producer=%ld, consumer=%ld\n",
|
PRINT(("MIDI Roster Event B_MIDI_CONNECTED: producer=%" B_PRId32
|
||||||
prod, cons));
|
", consumer=%" B_PRId32 "\n", prod, cons));
|
||||||
Connect(prod, cons);
|
Connect(prod, cons);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -315,13 +315,14 @@ PatchView::HandleMidiEvent(BMessage* msg)
|
|||||||
" field not found in B_MIDI_DISCONNECTED\n"));
|
" field not found in B_MIDI_DISCONNECTED\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
PRINT(("MIDI Roster Event B_MIDI_DISCONNECTED: producer=%ld, consumer=%ld\n",
|
PRINT(("MIDI Roster Event B_MIDI_DISCONNECTED: producer=%" B_PRId32
|
||||||
prod, cons));
|
", consumer=%" B_PRId32 "\n", prod, cons));
|
||||||
Disconnect(prod, cons);
|
Disconnect(prod, cons);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PRINT(("PatchView::HandleMidiEvent: unknown opcode %ld\n", op));
|
PRINT(("PatchView::HandleMidiEvent: unknown opcode %" B_PRId32 "\n",
|
||||||
|
op));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message)
|
|||||||
fLoggingView->LogFileName()));
|
fLoggingView->LogFileName()));
|
||||||
win->SetLogPath(fLoggingView->LogFileName());
|
win->SetLogPath(fLoggingView->LogFileName());
|
||||||
|
|
||||||
PRINT(("Pref Window: MaxConnections Slider: %ld\n",
|
PRINT(("Pref Window: MaxConnections Slider: %" B_PRId32 "\n",
|
||||||
fAdvancedView->MaxSimultaneousConnections()));
|
fAdvancedView->MaxSimultaneousConnections()));
|
||||||
server->SetMaxConns(fAdvancedView->MaxSimultaneousConnections());
|
server->SetMaxConns(fAdvancedView->MaxSimultaneousConnections());
|
||||||
win->SetMaxConnections(
|
win->SetMaxConnections(
|
||||||
@@ -167,7 +167,7 @@ PoorManPreferencesWindow::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
case MSG_PREF_ADV_SLD_MAX_CONNECTION:
|
case MSG_PREF_ADV_SLD_MAX_CONNECTION:
|
||||||
fMaxConnections = fAdvancedView->MaxSimultaneousConnections();
|
fMaxConnections = fAdvancedView->MaxSimultaneousConnections();
|
||||||
PRINT(("Max Connections: %ld\n", fMaxConnections));
|
PRINT(("Max Connections: %" B_PRId32 "\n", fMaxConnections));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BWindow::MessageReceived(message);
|
BWindow::MessageReceived(message);
|
||||||
|
|||||||
@@ -728,7 +728,7 @@ BMidiStore::ReadChunk()
|
|||||||
if (strncmp(fourcc, "MTrk", 4) == 0)
|
if (strncmp(fourcc, "MTrk", 4) == 0)
|
||||||
ReadTrack();
|
ReadTrack();
|
||||||
else {
|
else {
|
||||||
TRACE(("Skipping '%c%c%c%c' chunk (%lu bytes)",
|
TRACE(("Skipping '%c%c%c%c' chunk (%" B_PRIu32 " bytes)",
|
||||||
fourcc[0], fourcc[1], fourcc[2], fourcc[3], fByteCount))
|
fourcc[0], fourcc[1], fourcc[2], fourcc[3], fByteCount))
|
||||||
|
|
||||||
SkipBytes(fByteCount);
|
SkipBytes(fByteCount);
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ BMidiEndpoint::Release()
|
|||||||
{
|
{
|
||||||
int32 old = atomic_add(&fRefCount, -1);
|
int32 old = atomic_add(&fRefCount, -1);
|
||||||
|
|
||||||
TRACE(("BMidiEndpoint::Release refCount is now %ld", old - 1))
|
TRACE(("BMidiEndpoint::Release refCount is now %" B_PRId32, old - 1))
|
||||||
|
|
||||||
if (old == 1) {
|
if (old == 1) {
|
||||||
// If the reference count of a local endpoint drops to zero,
|
// If the reference count of a local endpoint drops to zero,
|
||||||
@@ -146,7 +146,7 @@ BMidiEndpoint::Acquire()
|
|||||||
#endif
|
#endif
|
||||||
atomic_add(&fRefCount, 1);
|
atomic_add(&fRefCount, 1);
|
||||||
|
|
||||||
TRACE(("BMidiEndpoint::Acquire refCount is now %ld", old + 1))
|
TRACE(("BMidiEndpoint::Acquire refCount is now %" B_PRId32, old + 1))
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ void
|
|||||||
BMidiLocalProducer::Connected(BMidiConsumer* cons)
|
BMidiLocalProducer::Connected(BMidiConsumer* cons)
|
||||||
{
|
{
|
||||||
ASSERT(cons != NULL)
|
ASSERT(cons != NULL)
|
||||||
TRACE(("Connected() %ld to %ld", ID(), cons->ID()))
|
TRACE(("Connected() %" B_PRId32 " to %" B_PRId32 "", ID(), cons->ID()))
|
||||||
|
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
@@ -51,7 +51,7 @@ void
|
|||||||
BMidiLocalProducer::Disconnected(BMidiConsumer* cons)
|
BMidiLocalProducer::Disconnected(BMidiConsumer* cons)
|
||||||
{
|
{
|
||||||
ASSERT(cons != NULL)
|
ASSERT(cons != NULL)
|
||||||
TRACE(("Disconnected() %ld from %ld", ID(), cons->ID()))
|
TRACE(("Disconnected() %" B_PRId32 " from %" B_PRId32 "", ID(), cons->ID()))
|
||||||
|
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -603,11 +603,11 @@ BMidiRosterLooper::DumpEndpoints()
|
|||||||
for (int32 t = 0; t < CountEndpoints(); ++t) {
|
for (int32 t = 0; t < CountEndpoints(); ++t) {
|
||||||
BMidiEndpoint* endp = EndpointAt(t);
|
BMidiEndpoint* endp = EndpointAt(t);
|
||||||
|
|
||||||
printf("\tendpoint %ld (%p):\n", t, endp);
|
printf("\tendpoint %" B_PRId32 " (%p):\n", t, endp);
|
||||||
|
|
||||||
printf(
|
printf(
|
||||||
"\t\tid %ld, name '%s', %s, %s, %s, %s, refcount %ld\n",
|
"\t\tid %" B_PRId32 ", name '%s', %s, %s, %s, %s, refcount %"
|
||||||
endp->ID(), endp->Name(),
|
B_PRId32 "\n", endp->ID(), endp->Name(),
|
||||||
endp->IsConsumer() ? "consumer" : "producer",
|
endp->IsConsumer() ? "consumer" : "producer",
|
||||||
endp->IsRegistered() ? "registered" : "unregistered",
|
endp->IsRegistered() ? "registered" : "unregistered",
|
||||||
endp->IsLocal() ? "local" : "remote",
|
endp->IsLocal() ? "local" : "remote",
|
||||||
@@ -618,7 +618,7 @@ BMidiRosterLooper::DumpEndpoints()
|
|||||||
|
|
||||||
if (endp->IsConsumer()) {
|
if (endp->IsConsumer()) {
|
||||||
BMidiConsumer* cons = (BMidiConsumer*) endp;
|
BMidiConsumer* cons = (BMidiConsumer*) endp;
|
||||||
printf("\t\tport %ld, latency %Ld\n",
|
printf("\t\tport %" B_PRId32 ", latency %" B_PRIdBIGTIME "\n",
|
||||||
cons->fPort, cons->fLatency);
|
cons->fPort, cons->fLatency);
|
||||||
} else {
|
} else {
|
||||||
BMidiProducer* prod = (BMidiProducer*) endp;
|
BMidiProducer* prod = (BMidiProducer*) endp;
|
||||||
@@ -626,7 +626,8 @@ BMidiRosterLooper::DumpEndpoints()
|
|||||||
printf("\t\tconnections:\n");
|
printf("\t\tconnections:\n");
|
||||||
for (int32 k = 0; k < prod->CountConsumers(); ++k) {
|
for (int32 k = 0; k < prod->CountConsumers(); ++k) {
|
||||||
BMidiConsumer* cons = prod->ConsumerAt(k);
|
BMidiConsumer* cons = prod->ConsumerAt(k);
|
||||||
printf("\t\t\tid %ld (%p)\n", cons->ID(), cons);
|
printf("\t\t\tid %" B_PRId32 " (%p)\n", cons->ID(),
|
||||||
|
cons);
|
||||||
}
|
}
|
||||||
prod->UnlockProducer();
|
prod->UnlockProducer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,14 +144,14 @@ MouseSettings::_SaveSettings()
|
|||||||
void
|
void
|
||||||
MouseSettings::Dump()
|
MouseSettings::Dump()
|
||||||
{
|
{
|
||||||
printf("type:\t\t%ld button mouse\n", fSettings.type);
|
printf("type:\t\t%" B_PRId32 " button mouse\n", fSettings.type);
|
||||||
printf("map:\t\tleft = %lu : middle = %lu : right = %lu\n",
|
printf("map:\t\tleft = %" B_PRIu32 " : middle = %" B_PRIu32 " : right = %"
|
||||||
fSettings.map.button[0], fSettings.map.button[2],
|
B_PRIu32 "\n", fSettings.map.button[0], fSettings.map.button[2],
|
||||||
fSettings.map.button[1]);
|
fSettings.map.button[1]);
|
||||||
printf("click speed:\t%Ld\n", fSettings.click_speed);
|
printf("click speed:\t%" B_PRId64 "\n", fSettings.click_speed);
|
||||||
printf("accel:\t\t%s\n", fSettings.accel.enabled ? "enabled" : "disabled");
|
printf("accel:\t\t%s\n", fSettings.accel.enabled ? "enabled" : "disabled");
|
||||||
printf("accel factor:\t%ld\n", fSettings.accel.accel_factor);
|
printf("accel factor:\t%" B_PRId32 "\n", fSettings.accel.accel_factor);
|
||||||
printf("speed:\t\t%ld\n", fSettings.accel.speed);
|
printf("speed:\t\t%" B_PRId32 "\n", fSettings.accel.speed);
|
||||||
|
|
||||||
const char *mode = "unknown";
|
const char *mode = "unknown";
|
||||||
switch (fMode) {
|
switch (fMode) {
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ MidiServerApp::OnChangeEndpoint(BMessage* msg)
|
|||||||
reply.AddInt32("midi:result", err);
|
reply.AddInt32("midi:result", err);
|
||||||
|
|
||||||
if (SendReply(app, msg, &reply) && err == B_OK) {
|
if (SendReply(app, msg, &reply) && err == B_OK) {
|
||||||
TRACE(("Endpoint %ld (%p) changed", endp->id, endp))
|
TRACE(("Endpoint %" B_PRId32 " (%p) changed", endp->id, endp))
|
||||||
|
|
||||||
BMessage notify;
|
BMessage notify;
|
||||||
notify.what = MSG_ENDPOINT_CHANGED;
|
notify.what = MSG_ENDPOINT_CHANGED;
|
||||||
@@ -320,11 +320,13 @@ MidiServerApp::OnConnectDisconnect(BMessage* msg)
|
|||||||
|
|
||||||
if (SendReply(app, msg, &reply) && err == B_OK) {
|
if (SendReply(app, msg, &reply) && err == B_OK) {
|
||||||
if (mustConnect) {
|
if (mustConnect) {
|
||||||
TRACE(("Connection made: %ld ---> %ld", prod->id, cons->id))
|
TRACE(("Connection made: %" B_PRId32 " ---> %" B_PRId32, prod->id,
|
||||||
|
cons->id))
|
||||||
|
|
||||||
prod->connections.AddItem(cons);
|
prod->connections.AddItem(cons);
|
||||||
} else {
|
} else {
|
||||||
TRACE(("Connection broken: %ld -X-> %ld", prod->id, cons->id))
|
TRACE(("Connection broken: %" B_PRId32 " -X-> %" B_PRId32, prod->id,
|
||||||
|
cons->id))
|
||||||
|
|
||||||
prod->connections.RemoveItem(cons);
|
prod->connections.RemoveItem(cons);
|
||||||
}
|
}
|
||||||
@@ -392,7 +394,7 @@ MidiServerApp::AddEndpoint(BMessage* msg, endpoint_t* endp)
|
|||||||
ASSERT(endp != NULL)
|
ASSERT(endp != NULL)
|
||||||
ASSERT(!endpoints.HasItem(endp))
|
ASSERT(!endpoints.HasItem(endp))
|
||||||
|
|
||||||
TRACE(("Endpoint %ld (%p) added", endp->id, endp))
|
TRACE(("Endpoint %" B_PRId32 " (%p) added", endp->id, endp))
|
||||||
|
|
||||||
endpoints.AddItem(endp);
|
endpoints.AddItem(endp);
|
||||||
|
|
||||||
@@ -412,7 +414,7 @@ MidiServerApp::RemoveEndpoint(app_t* app, endpoint_t* endp)
|
|||||||
ASSERT(endp != NULL)
|
ASSERT(endp != NULL)
|
||||||
ASSERT(endpoints.HasItem(endp))
|
ASSERT(endpoints.HasItem(endp))
|
||||||
|
|
||||||
TRACE(("Endpoint %ld (%p) removed", endp->id, endp))
|
TRACE(("Endpoint %" B_PRId32 " (%p) removed", endp->id, endp))
|
||||||
|
|
||||||
endpoints.RemoveItem(endp);
|
endpoints.RemoveItem(endp);
|
||||||
|
|
||||||
@@ -502,7 +504,7 @@ MidiServerApp::WhichApp(BMessage* msg)
|
|||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE(("Application %ld is not registered", retadr.Team()))
|
TRACE(("Application %" B_PRId32 " is not registered", retadr.Team()))
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -537,7 +539,7 @@ MidiServerApp::FindEndpoint(int32 id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE(("Endpoint %ld not found", id))
|
TRACE(("Endpoint %" B_PRId32 " not found", id))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,7 +705,8 @@ MidiServerApp::DumpApps()
|
|||||||
for (int32 t = 0; t < CountApps(); ++t) {
|
for (int32 t = 0; t < CountApps(); ++t) {
|
||||||
app_t* app = AppAt(t);
|
app_t* app = AppAt(t);
|
||||||
|
|
||||||
printf("\tapp %ld (%p): team %ld\n", t, app, app->messenger.Team());
|
printf("\tapp %" B_PRId32 " (%p): team %" B_PRId32 "\n", t, app,
|
||||||
|
app->messenger.Team());
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("*** END DumpApps\n");
|
printf("*** END DumpApps\n");
|
||||||
@@ -720,8 +723,8 @@ MidiServerApp::DumpEndpoints()
|
|||||||
for (int32 t = 0; t < CountEndpoints(); ++t) {
|
for (int32 t = 0; t < CountEndpoints(); ++t) {
|
||||||
endpoint_t* endp = EndpointAt(t);
|
endpoint_t* endp = EndpointAt(t);
|
||||||
|
|
||||||
printf("\tendpoint %ld (%p):\n", t, endp);
|
printf("\tendpoint %" B_PRId32 " (%p):\n", t, endp);
|
||||||
printf("\t\tid %ld, name '%s', %s, %s, app %p\n",
|
printf("\t\tid %" B_PRId32 ", name '%s', %s, %s, app %p\n",
|
||||||
endp->id, endp->name.String(),
|
endp->id, endp->name.String(),
|
||||||
endp->consumer ? "consumer" : "producer",
|
endp->consumer ? "consumer" : "producer",
|
||||||
endp->registered ? "registered" : "unregistered",
|
endp->registered ? "registered" : "unregistered",
|
||||||
@@ -729,12 +732,13 @@ MidiServerApp::DumpEndpoints()
|
|||||||
printf("\t\tproperties: "); endp->properties.PrintToStream();
|
printf("\t\tproperties: "); endp->properties.PrintToStream();
|
||||||
|
|
||||||
if (endp->consumer)
|
if (endp->consumer)
|
||||||
printf("\t\tport %ld, latency %Ld\n", endp->port, endp->latency);
|
printf("\t\tport %" B_PRId32 ", latency %" B_PRIdBIGTIME "\n",
|
||||||
|
endp->port, endp->latency);
|
||||||
else {
|
else {
|
||||||
printf("\t\tconnections:\n");
|
printf("\t\tconnections:\n");
|
||||||
for (int32 k = 0; k < CountConnections(endp); ++k) {
|
for (int32 k = 0; k < CountConnections(endp); ++k) {
|
||||||
endpoint_t* cons = ConnectionAt(endp, k);
|
endpoint_t* cons = ConnectionAt(endp, k);
|
||||||
printf("\t\t\tid %ld (%p)\n", cons->id, cons);
|
printf("\t\t\tid %" B_PRId32 " (%p)\n", cons->id, cons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -356,8 +356,8 @@ public:
|
|||||||
|
|
||||||
status_t PushMessage(Message *message, int32 token)
|
status_t PushMessage(Message *message, int32 token)
|
||||||
{
|
{
|
||||||
PRINT("MessageDeliverer::TargetPort::PushMessage(port: %ld, %p, %ld)\n",
|
PRINT("MessageDeliverer::TargetPort::PushMessage(port: %" B_PRId32 ", %p, %"
|
||||||
fPortID, message, token);
|
B_PRId32 ")\n", fPortID, message, token);
|
||||||
// create a target message
|
// create a target message
|
||||||
TargetMessage *targetMessage
|
TargetMessage *targetMessage
|
||||||
= new(nothrow) TargetMessage(message, token);
|
= new(nothrow) TargetMessage(message, token);
|
||||||
@@ -390,7 +390,7 @@ fPortID, message, token);
|
|||||||
void PopMessage()
|
void PopMessage()
|
||||||
{
|
{
|
||||||
if (fMessages.Head()) {
|
if (fMessages.Head()) {
|
||||||
PRINT("MessageDeliverer::TargetPort::PopMessage(): port: %ld, %p\n",
|
PRINT("MessageDeliverer::TargetPort::PopMessage(): port: %" B_PRId32 ", %p\n",
|
||||||
fPortID, fMessages.Head()->GetMessage());
|
fPortID, fMessages.Head()->GetMessage());
|
||||||
_RemoveMessage(fMessages.Head());
|
_RemoveMessage(fMessages.Head());
|
||||||
}
|
}
|
||||||
@@ -405,8 +405,8 @@ fPortID, fMessages.Head()->GetMessage());
|
|||||||
if (message->GetMessage()->TimeoutTime() > now)
|
if (message->GetMessage()->TimeoutTime() > now)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
PRINT("MessageDeliverer::TargetPort::DropTimedOutMessages(): port: %ld: "
|
PRINT("MessageDeliverer::TargetPort::DropTimedOutMessages(): port: %" B_PRId32
|
||||||
"message %p timed out\n", fPortID, message->GetMessage());
|
": message %p timed out\n", fPortID, message->GetMessage());
|
||||||
_RemoveMessage(message);
|
_RemoveMessage(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -433,15 +433,15 @@ private:
|
|||||||
{
|
{
|
||||||
// message count
|
// message count
|
||||||
while (fMessageCount > kMaxMessagesPerPort) {
|
while (fMessageCount > kMaxMessagesPerPort) {
|
||||||
PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %ld: hit maximum "
|
PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %" B_PRId32
|
||||||
"message count limit.\n", fPortID);
|
": hit maximum message count limit.\n", fPortID);
|
||||||
PopMessage();
|
PopMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
// message size
|
// message size
|
||||||
while (fMessageSize > kMaxDataPerPort) {
|
while (fMessageSize > kMaxDataPerPort) {
|
||||||
PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %ld: hit maximum "
|
PRINT("MessageDeliverer::TargetPort::_EnforceLimits(): port: %" B_PRId32
|
||||||
"message size limit.\n", fPortID);
|
": hit maximum message size limit.\n", fPortID);
|
||||||
PopMessage();
|
PopMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -751,8 +751,9 @@ MessageRunnerManager::_ScheduleEvent(RunnerInfo *info)
|
|||||||
info->event->SetTime(info->time);
|
info->event->SetTime(info->time);
|
||||||
scheduled = fEventQueue->AddEvent(info->event);
|
scheduled = fEventQueue->AddEvent(info->event);
|
||||||
|
|
||||||
PRINT("runner %ld (%lld, %ld) rescheduled: %d, time: %lld, now: %lld\n",
|
PRINT("runner %" B_PRId32 " (%" B_PRId64 ", %" B_PRId32 ") rescheduled: %d, "
|
||||||
info->token, info->interval, info->count, scheduled, info->time, system_time());
|
"time: %" B_PRId64 ", now: %" B_PRId64 "\n", info->token, info->interval,
|
||||||
|
info->count, scheduled, info->time, system_time());
|
||||||
}
|
}
|
||||||
return scheduled;
|
return scheduled;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -312,17 +312,19 @@ RecentEntries::Save(FILE* file, const char *description, const char *tag)
|
|||||||
fprintf(file, " \"%s\" %" B_PRId32, entry->sig.c_str(),
|
fprintf(file, " \"%s\" %" B_PRId32, entry->sig.c_str(),
|
||||||
entry->index);
|
entry->index);
|
||||||
} else {
|
} else {
|
||||||
D(PRINT("WARNING: RecentEntries::Save(): The entry %ld "
|
D(PRINT("WARNING: RecentEntries::Save(): The entry %"
|
||||||
"entries from the front of the compiled recent_entry* "
|
B_PRId32 " entries from the front of the compiled "
|
||||||
"list for the entry ref (%ld, %lld, '%s') was found to "
|
"recent_entry* list for the entry ref (%" B_PRId32 ", %"
|
||||||
"be NULL\n", i, mapItem->first.device,
|
B_PRId64 ", '%s') was found to be NULL\n", i,
|
||||||
mapItem->first.directory, mapItem->first.name));
|
mapItem->first.device, mapItem->first.directory,
|
||||||
|
mapItem->first.name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(file, "\n");
|
fprintf(file, "\n");
|
||||||
} else {
|
} else {
|
||||||
D(PRINT("WARNING: RecentEntries::Save(): entry_ref_to_path() "
|
D(PRINT("WARNING: RecentEntries::Save(): entry_ref_to_path() "
|
||||||
"failed on the entry_ref (%ld, %lld, '%s') with error 0x%lx\n",
|
"failed on the entry_ref (%" B_PRId32", %" B_PRId64 ", '%s') "
|
||||||
|
"with error 0x%" B_PRIx32 "\n",
|
||||||
mapItem->first.device, mapItem->first.directory,
|
mapItem->first.device, mapItem->first.directory,
|
||||||
mapItem->first.name, outputError));
|
mapItem->first.name, outputError));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ RosterSettingsCharStream::GetString(char *result)
|
|||||||
// NULL terminate regardless
|
// NULL terminate regardless
|
||||||
result[resultPos] = '\0';
|
result[resultPos] = '\0';
|
||||||
|
|
||||||
D(PRINT("error == 0x%lx, result == '%s'\n", error, result));
|
D(PRINT("error == 0x%" B_PRIx32 ", result == '%s'\n", error, result));
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -739,8 +739,8 @@ ShutdownProcess::MessageReceived(BMessage* message)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINT("ShutdownProcess::MessageReceived(): B_SOME_APP_QUIT: %ld\n",
|
PRINT("ShutdownProcess::MessageReceived(): B_SOME_APP_QUIT: %"
|
||||||
team);
|
B_PRId32 "\n", team);
|
||||||
|
|
||||||
// remove the app info from the respective list
|
// remove the app info from the respective list
|
||||||
int32 phase;
|
int32 phase;
|
||||||
@@ -774,7 +774,8 @@ ShutdownProcess::MessageReceived(BMessage* message)
|
|||||||
// get the phase the event is intended for
|
// get the phase the event is intended for
|
||||||
int32 phase = TimeoutEvent::GetMessagePhase(message);
|
int32 phase = TimeoutEvent::GetMessagePhase(message);
|
||||||
team_id team = TimeoutEvent::GetMessageTeam(message);;
|
team_id team = TimeoutEvent::GetMessageTeam(message);;
|
||||||
PRINT("MSG_PHASE_TIMED_OUT: phase: %ld, team: %ld\n", phase, team);
|
PRINT("MSG_PHASE_TIMED_OUT: phase: %" B_PRId32 ", team: %" B_PRId32
|
||||||
|
"\n", phase, team);
|
||||||
|
|
||||||
BAutolock _(fWorkerLock);
|
BAutolock _(fWorkerLock);
|
||||||
|
|
||||||
@@ -837,10 +838,12 @@ ShutdownProcess::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
BAutolock _(fWorkerLock);
|
BAutolock _(fWorkerLock);
|
||||||
if (open) {
|
if (open) {
|
||||||
PRINT("B_REG_TEAM_DEBUGGER_ALERT: insert %ld\n", team);
|
PRINT("B_REG_TEAM_DEBUGGER_ALERT: insert %" B_PRId32 "\n",
|
||||||
|
team);
|
||||||
fDebuggedTeams.insert(team);
|
fDebuggedTeams.insert(team);
|
||||||
} else {
|
} else {
|
||||||
PRINT("B_REG_TEAM_DEBUGGER_ALERT: remove %ld\n", team);
|
PRINT("B_REG_TEAM_DEBUGGER_ALERT: remove %" B_PRId32 "\n",
|
||||||
|
team);
|
||||||
fDebuggedTeams.erase(team);
|
fDebuggedTeams.erase(team);
|
||||||
_PushEvent(DEBUG_EVENT, -1, fCurrentPhase);
|
_PushEvent(DEBUG_EVENT, -1, fCurrentPhase);
|
||||||
}
|
}
|
||||||
@@ -1397,7 +1400,7 @@ ShutdownProcess::_WaitForApp(team_id team, AppInfoList* list, bool systemApps)
|
|||||||
} else {
|
} else {
|
||||||
// The app returned false in QuitRequested().
|
// The app returned false in QuitRequested().
|
||||||
PRINT("ShutdownProcess::_WaitForApp(): shutdown cancelled "
|
PRINT("ShutdownProcess::_WaitForApp(): shutdown cancelled "
|
||||||
"by team %ld (-1 => user)\n", eventTeam);
|
"by team %" B_PRId32 " (-1 => user)\n", eventTeam);
|
||||||
|
|
||||||
_DisplayAbortingApp(team);
|
_DisplayAbortingApp(team);
|
||||||
throw_error(B_SHUTDOWN_CANCELLED);
|
throw_error(B_SHUTDOWN_CANCELLED);
|
||||||
@@ -1433,7 +1436,7 @@ ShutdownProcess::_QuitApps(AppInfoList& list, bool systemApps)
|
|||||||
|
|
||||||
if (event == ABORT_EVENT) {
|
if (event == ABORT_EVENT) {
|
||||||
PRINT("ShutdownProcess::_QuitApps(): shutdown cancelled by "
|
PRINT("ShutdownProcess::_QuitApps(): shutdown cancelled by "
|
||||||
"team %ld (-1 => user)\n", team);
|
"team %" B_PRId32 " (-1 => user)\n", team);
|
||||||
|
|
||||||
_DisplayAbortingApp(team);
|
_DisplayAbortingApp(team);
|
||||||
throw_error(B_SHUTDOWN_CANCELLED);
|
throw_error(B_SHUTDOWN_CANCELLED);
|
||||||
@@ -1459,7 +1462,7 @@ ShutdownProcess::_QuitApps(AppInfoList& list, bool systemApps)
|
|||||||
|
|
||||||
if (!systemApps && event == ABORT_EVENT) {
|
if (!systemApps && event == ABORT_EVENT) {
|
||||||
PRINT("ShutdownProcess::_QuitApps(): shutdown cancelled by "
|
PRINT("ShutdownProcess::_QuitApps(): shutdown cancelled by "
|
||||||
"team %ld (-1 => user)\n", team);
|
"team %" B_PRId32 " (-1 => user)\n", team);
|
||||||
|
|
||||||
_DisplayAbortingApp(team);
|
_DisplayAbortingApp(team);
|
||||||
throw_error(B_SHUTDOWN_CANCELLED);
|
throw_error(B_SHUTDOWN_CANCELLED);
|
||||||
@@ -1498,8 +1501,8 @@ ShutdownProcess::_QuitApps(AppInfoList& list, bool systemApps)
|
|||||||
_SetShutdownWindowCurrentApp(team);
|
_SetShutdownWindowCurrentApp(team);
|
||||||
|
|
||||||
// send the shutdown message to the app
|
// send the shutdown message to the app
|
||||||
PRINT(" sending team %ld (port: %ld) a shutdown message\n", team,
|
PRINT(" sending team %" B_PRId32 " (port: %" B_PRId32 ") a shutdown "
|
||||||
port);
|
"message\n", team, port);
|
||||||
SingleMessagingTargetSet target(port, B_PREFERRED_TOKEN);
|
SingleMessagingTargetSet target(port, B_PREFERRED_TOKEN);
|
||||||
MessageDeliverer::Default()->DeliverMessage(&message, target);
|
MessageDeliverer::Default()->DeliverMessage(&message, target);
|
||||||
|
|
||||||
@@ -1547,7 +1550,7 @@ ShutdownProcess::_QuitBackgroundApps()
|
|||||||
AppInfoListMessagingTargetSet targetSet(fBackgroundApps);
|
AppInfoListMessagingTargetSet targetSet(fBackgroundApps);
|
||||||
|
|
||||||
if (targetSet.HasNext()) {
|
if (targetSet.HasNext()) {
|
||||||
PRINT(" sending shutdown message to %ld apps\n",
|
PRINT(" sending shutdown message to %" B_PRId32 " apps\n",
|
||||||
fBackgroundApps.CountInfos());
|
fBackgroundApps.CountInfos());
|
||||||
|
|
||||||
status_t error = MessageDeliverer::Default()->DeliverMessage(
|
status_t error = MessageDeliverer::Default()->DeliverMessage(
|
||||||
@@ -1653,7 +1656,7 @@ ShutdownProcess::_QuitNonApps()
|
|||||||
team_info teamInfo;
|
team_info teamInfo;
|
||||||
while (get_next_team_info(&cookie, &teamInfo) == B_OK) {
|
while (get_next_team_info(&cookie, &teamInfo) == B_OK) {
|
||||||
if (fVitalSystemApps.find(teamInfo.team) == fVitalSystemApps.end()) {
|
if (fVitalSystemApps.find(teamInfo.team) == fVitalSystemApps.end()) {
|
||||||
PRINT(" sending team %ld TERM signal\n", teamInfo.team);
|
PRINT(" sending team %" B_PRId32 " TERM signal\n", teamInfo.team);
|
||||||
|
|
||||||
#ifdef __HAIKU__
|
#ifdef __HAIKU__
|
||||||
// Note: team ID == team main thread ID under Haiku
|
// Note: team ID == team main thread ID under Haiku
|
||||||
@@ -1674,7 +1677,7 @@ ShutdownProcess::_QuitNonApps()
|
|||||||
cookie = 0;
|
cookie = 0;
|
||||||
while (get_next_team_info(&cookie, &teamInfo) == B_OK) {
|
while (get_next_team_info(&cookie, &teamInfo) == B_OK) {
|
||||||
if (fVitalSystemApps.find(teamInfo.team) == fVitalSystemApps.end()) {
|
if (fVitalSystemApps.find(teamInfo.team) == fVitalSystemApps.end()) {
|
||||||
PRINT(" killing team %ld\n", teamInfo.team);
|
PRINT(" killing team %" B_PRId32 "\n", teamInfo.team);
|
||||||
|
|
||||||
#ifdef __HAIKU__
|
#ifdef __HAIKU__
|
||||||
kill_team(teamInfo.team);
|
kill_team(teamInfo.team);
|
||||||
@@ -1735,7 +1738,8 @@ ShutdownProcess::_QuitBlockingApp(AppInfoList& list, team_id team,
|
|||||||
if (event == ABORT_EVENT) {
|
if (event == ABORT_EVENT) {
|
||||||
if (cancelAllowed || debugged) {
|
if (cancelAllowed || debugged) {
|
||||||
PRINT("ShutdownProcess::_QuitBlockingApp(): shutdown "
|
PRINT("ShutdownProcess::_QuitBlockingApp(): shutdown "
|
||||||
"cancelled by team %ld (-1 => user)\n", eventTeam);
|
"cancelled by team %" B_PRId32 " (-1 => user)\n",
|
||||||
|
eventTeam);
|
||||||
|
|
||||||
if (!debugged)
|
if (!debugged)
|
||||||
_DisplayAbortingApp(eventTeam);
|
_DisplayAbortingApp(eventTeam);
|
||||||
@@ -1757,7 +1761,7 @@ ShutdownProcess::_QuitBlockingApp(AppInfoList& list, team_id team,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// kill the app
|
// kill the app
|
||||||
PRINT(" killing team %ld\n", team);
|
PRINT(" killing team %" B_PRId32 "\n", team);
|
||||||
|
|
||||||
kill_team(team);
|
kill_team(team);
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ TRoster::HandleAddApplication(BMessage* request)
|
|||||||
if (request->FindBool("full_registration", &fullReg) != B_OK)
|
if (request->FindBool("full_registration", &fullReg) != B_OK)
|
||||||
fullReg = false;
|
fullReg = false;
|
||||||
|
|
||||||
PRINT("team: %ld, signature: %s\n", team, signature);
|
PRINT("team: %" B_PRId32 ", signature: %s\n", team, signature);
|
||||||
PRINT("full registration: %d\n", fullReg);
|
PRINT("full registration: %d\n", fullReg);
|
||||||
|
|
||||||
if (fShuttingDown)
|
if (fShuttingDown)
|
||||||
@@ -203,8 +203,9 @@ TRoster::HandleAddApplication(BMessage* request)
|
|||||||
|
|
||||||
// entry_ref
|
// entry_ref
|
||||||
if (error == B_OK) {
|
if (error == B_OK) {
|
||||||
PRINT("flags: %lx\n", flags);
|
PRINT("flags: %" B_PRIx32 "\n", flags);
|
||||||
PRINT("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name);
|
PRINT("ref: %" B_PRId32 ", %" B_PRId64 ", %s\n", ref.device,
|
||||||
|
ref.directory, ref.name);
|
||||||
// check single/exclusive launchers
|
// check single/exclusive launchers
|
||||||
RosterAppInfo* info = NULL;
|
RosterAppInfo* info = NULL;
|
||||||
if ((launchFlags == B_SINGLE_LAUNCH
|
if ((launchFlags == B_SINGLE_LAUNCH
|
||||||
@@ -253,15 +254,15 @@ TRoster::HandleAddApplication(BMessage* request)
|
|||||||
// add it to the right list
|
// add it to the right list
|
||||||
bool addingSuccess = false;
|
bool addingSuccess = false;
|
||||||
if (team >= 0) {
|
if (team >= 0) {
|
||||||
PRINT("added ref: %ld, %lld, %s\n", info->ref.device,
|
PRINT("added ref: %" B_PRId32 ", %" B_PRId64 ", %s\n",
|
||||||
info->ref.directory, info->ref.name);
|
info->ref.device, info->ref.directory, info->ref.name);
|
||||||
addingSuccess = (AddApp(info) == B_OK);
|
addingSuccess = (AddApp(info) == B_OK);
|
||||||
if (addingSuccess && fullReg)
|
if (addingSuccess && fullReg)
|
||||||
_AppAdded(info);
|
_AppAdded(info);
|
||||||
} else {
|
} else {
|
||||||
token = info->token = _NextToken();
|
token = info->token = _NextToken();
|
||||||
addingSuccess = fEarlyPreRegisteredApps.AddInfo(info);
|
addingSuccess = fEarlyPreRegisteredApps.AddInfo(info);
|
||||||
PRINT("added to early pre-regs, token: %lu\n", token);
|
PRINT("added to early pre-regs, token: %" B_PRIu32 "\n", token);
|
||||||
}
|
}
|
||||||
if (!addingSuccess)
|
if (!addingSuccess)
|
||||||
SET_ERROR(error, B_NO_MEMORY);
|
SET_ERROR(error, B_NO_MEMORY);
|
||||||
@@ -385,8 +386,9 @@ TRoster::HandleIsAppRegistered(BMessage* request)
|
|||||||
if (request->FindInt32("token", (int32*)&token) != B_OK)
|
if (request->FindInt32("token", (int32*)&token) != B_OK)
|
||||||
token = 0;
|
token = 0;
|
||||||
|
|
||||||
PRINT("team: %ld, token: %lu\n", team, token);
|
PRINT("team: %" B_PRId32 ", token: %" B_PRIu32 "\n", team, token);
|
||||||
PRINT("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name);
|
PRINT("ref: %" B_PRId32 ", %" B_PRId64 ", %s\n", ref.device, ref.directory,
|
||||||
|
ref.name);
|
||||||
|
|
||||||
// check the parameters
|
// check the parameters
|
||||||
// entry_ref
|
// entry_ref
|
||||||
@@ -486,7 +488,7 @@ TRoster::HandleRemoveApp(BMessage* request)
|
|||||||
if (request->FindInt32("team", &team) != B_OK)
|
if (request->FindInt32("team", &team) != B_OK)
|
||||||
team = -1;
|
team = -1;
|
||||||
|
|
||||||
PRINT("team: %ld\n", team);
|
PRINT("team: %" B_PRId32 "\n", team);
|
||||||
|
|
||||||
// remove the app
|
// remove the app
|
||||||
if (error == B_OK) {
|
if (error == B_OK) {
|
||||||
@@ -538,7 +540,8 @@ TRoster::HandleSetThreadAndTeam(BMessage* request)
|
|||||||
if (error == B_OK && team < 0)
|
if (error == B_OK && team < 0)
|
||||||
SET_ERROR(error, B_BAD_VALUE);
|
SET_ERROR(error, B_BAD_VALUE);
|
||||||
|
|
||||||
PRINT("team: %ld, thread: %ld, token: %lu\n", team, thread, token);
|
PRINT("team: %" B_PRId32 ", thread: %" B_PRId32 ", token: %" B_PRIu32 "\n",
|
||||||
|
team, thread, token);
|
||||||
|
|
||||||
// update the app_info
|
// update the app_info
|
||||||
if (error == B_OK) {
|
if (error == B_OK) {
|
||||||
@@ -667,9 +670,10 @@ TRoster::HandleGetAppInfo(BMessage* request)
|
|||||||
hasSignature = false;
|
hasSignature = false;
|
||||||
|
|
||||||
if (hasTeam)
|
if (hasTeam)
|
||||||
PRINT("team: %ld\n", team);
|
PRINT("team: %" B_PRId32 "\n", team);
|
||||||
if (hasRef)
|
if (hasRef)
|
||||||
PRINT("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name);
|
PRINT("ref: %" B_PRId32 ", %" B_PRId64 ", %s\n", ref.device, ref.directory,
|
||||||
|
ref.name);
|
||||||
if (hasSignature)
|
if (hasSignature)
|
||||||
PRINT("signature: %s\n", signature);
|
PRINT("signature: %s\n", signature);
|
||||||
|
|
||||||
@@ -1801,7 +1805,7 @@ TRoster::_HandleGetRecentEntries(BMessage* request)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
D(PRINT("WARNING: TRoster::_HandleGetRecentEntries(): "
|
D(PRINT("WARNING: TRoster::_HandleGetRecentEntries(): "
|
||||||
"unexpected request->what value of 0x%lx\n",
|
"unexpected request->what value of 0x%" B_PRIx32 "\n",
|
||||||
request->what));
|
request->what));
|
||||||
error = B_BAD_VALUE;
|
error = B_BAD_VALUE;
|
||||||
break;
|
break;
|
||||||
@@ -1963,15 +1967,17 @@ TRoster::_LoadRosterSettings(const char* path)
|
|||||||
}
|
}
|
||||||
if (!streamError) {
|
if (!streamError) {
|
||||||
D(printf("pushing entry, leaf == '%s', app == "
|
D(printf("pushing entry, leaf == '%s', app == "
|
||||||
"'%s', index == %ld\n", entry->ref.name,
|
"'%s', index == %" B_PRId32 "\n",
|
||||||
entry->sig.c_str(), entry->index));
|
entry->ref.name, entry->sig.c_str(),
|
||||||
|
entry->index));
|
||||||
|
|
||||||
list->push_back(entry);
|
list->push_back(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (streamError) {
|
if (streamError) {
|
||||||
D(printf("entry error 0x%lx\n", streamError));
|
D(printf("entry error 0x%" B_PRIx32 "\n",
|
||||||
|
streamError));
|
||||||
if (streamError
|
if (streamError
|
||||||
!= RosterSettingsCharStream::kEndOfLine
|
!= RosterSettingsCharStream::kEndOfLine
|
||||||
&& streamError
|
&& streamError
|
||||||
@@ -2024,7 +2030,7 @@ TRoster::_LoadRosterSettings(const char* path)
|
|||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
D(PRINT("WARNING: TRoster::_LoadRosterSettings(): error loading roster "
|
D(PRINT("WARNING: TRoster::_LoadRosterSettings(): error loading roster "
|
||||||
"settings from '%s', 0x%lx\n", settingsPath, error));
|
"settings from '%s', 0x%" B_PRIx32 "\n", settingsPath, error));
|
||||||
}
|
}
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2047,17 +2053,17 @@ TRoster::_SaveRosterSettings(const char* path)
|
|||||||
saveError = fRecentDocuments.Save(file, "Recent documents", "RecentDoc");
|
saveError = fRecentDocuments.Save(file, "Recent documents", "RecentDoc");
|
||||||
if (saveError) {
|
if (saveError) {
|
||||||
D(PRINT("TRoster::_SaveRosterSettings(): recent documents save "
|
D(PRINT("TRoster::_SaveRosterSettings(): recent documents save "
|
||||||
"failed with error 0x%lx\n", saveError));
|
"failed with error 0x%" B_PRIx32 "\n", saveError));
|
||||||
}
|
}
|
||||||
saveError = fRecentFolders.Save(file, "Recent folders", "RecentFolder");
|
saveError = fRecentFolders.Save(file, "Recent folders", "RecentFolder");
|
||||||
if (saveError) {
|
if (saveError) {
|
||||||
D(PRINT("TRoster::_SaveRosterSettings(): recent folders save "
|
D(PRINT("TRoster::_SaveRosterSettings(): recent folders save "
|
||||||
"failed with error 0x%lx\n", saveError));
|
"failed with error 0x%" B_PRIx32 "\n", saveError));
|
||||||
}
|
}
|
||||||
saveError = fRecentApps.Save(file);
|
saveError = fRecentApps.Save(file);
|
||||||
if (saveError) {
|
if (saveError) {
|
||||||
D(PRINT("TRoster::_SaveRosterSettings(): recent folders save "
|
D(PRINT("TRoster::_SaveRosterSettings(): recent folders save "
|
||||||
"failed with error 0x%lx\n", saveError));
|
"failed with error 0x%" B_PRIx32 "\n", saveError));
|
||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,8 +100,9 @@ void dump_fd(int fd, struct file_descriptor* descriptor);
|
|||||||
void
|
void
|
||||||
dump_fd(int fd,struct file_descriptor* descriptor)
|
dump_fd(int fd,struct file_descriptor* descriptor)
|
||||||
{
|
{
|
||||||
dprintf("fd[%d] = %p: type = %ld, ref_count = %ld, ops = %p, u.vnode = %p, "
|
dprintf("fd[%d] = %p: type = %" B_PRId32 ", ref_count = %" B_PRId32 ", ops "
|
||||||
"u.mount = %p, cookie = %p, open_mode = %lx, pos = %Ld\n",
|
"= %p, u.vnode = %p, u.mount = %p, cookie = %p, open_mode = %" B_PRIx32
|
||||||
|
", pos = %" B_PRId64 "\n",
|
||||||
fd, descriptor, descriptor->type, descriptor->ref_count,
|
fd, descriptor, descriptor->type, descriptor->ref_count,
|
||||||
descriptor->ops, descriptor->u.vnode, descriptor->u.mount,
|
descriptor->ops, descriptor->u.vnode, descriptor->u.mount,
|
||||||
descriptor->cookie, descriptor->open_mode, descriptor->pos);
|
descriptor->cookie, descriptor->open_mode, descriptor->pos);
|
||||||
|
|||||||
Reference in New Issue
Block a user