Play startup sound after the first defaults rescan is done. This fixed #1902.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34189 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
78f94f81ff
commit
2795d5dca5
@ -104,6 +104,7 @@ enum {
|
||||
// Raw port based communication
|
||||
enum {
|
||||
ADDONSERVER_RESCAN_MEDIAADDON_FLAVORS = 0x50,
|
||||
ADDONSERVER_RESCAN_FINISHED_NOTIFY,
|
||||
|
||||
SERVER_MESSAGE_START = 0x100,
|
||||
SERVER_REGISTER_APP,
|
||||
@ -715,6 +716,9 @@ struct addonserver_rescan_mediaaddon_flavors_command : command_data {
|
||||
media_addon_id addonid;
|
||||
};
|
||||
|
||||
struct addonserver_rescan_finished_notify_command : command_data {
|
||||
};
|
||||
|
||||
struct server_register_mediaaddon_request : request_data {
|
||||
xfer_entry_ref ref;
|
||||
};
|
||||
|
@ -332,6 +332,9 @@ DefaultManager::RescanThread()
|
||||
} else {
|
||||
ERROR("DefaultManager: Did not try to connect mixer and soundcard\n");
|
||||
}
|
||||
|
||||
addonserver_rescan_finished_notify_command cmd;
|
||||
SendToAddonServer(ADDONSERVER_RESCAN_FINISHED_NOTIFY, &cmd, sizeof(cmd));
|
||||
|
||||
printf("DefaultManager::RescanThread() leave\n");
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Beep.h>
|
||||
#include <Directory.h>
|
||||
#include <Entry.h>
|
||||
#include <FindDirectory.h>
|
||||
@ -101,6 +102,7 @@ private:
|
||||
port_id fControlPort;
|
||||
thread_id fControlThread;
|
||||
bool fStartup;
|
||||
bool fStartupSound;
|
||||
|
||||
typedef BApplication inherited;
|
||||
};
|
||||
@ -108,7 +110,8 @@ private:
|
||||
|
||||
MediaAddonServer::MediaAddonServer(const char *sig)
|
||||
: BApplication(sig),
|
||||
fStartup(true)
|
||||
fStartup(true),
|
||||
fStartupSound(true)
|
||||
{
|
||||
CALLED();
|
||||
fMediaRoster = BMediaRoster::Roster();
|
||||
@ -168,7 +171,14 @@ MediaAddonServer::HandleMessage(int32 code, const void *data, size_t size)
|
||||
_DormantNodeManager->PutAddon(command->addonid);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case ADDONSERVER_RESCAN_FINISHED_NOTIFY:
|
||||
if (fStartupSound) {
|
||||
system_beep(MEDIA_SOUNDS_STARTUP);
|
||||
fStartupSound = false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR("media_addon_server: received unknown message code %#08lx\n",code);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user