Prev Previous Post   Next Post Next
Old 30th September 2002, 21:29   #1
Ilitirit
Junior Member
 
Join Date: Nov 2001
Posts: 27
Question Cores and CoreHandles

How do I assign/get the name of a MEDIACORE?
the developer faq says:
Quote:
A CoreHandle with no parameters is for the "main" core in WA3. You can, however, have other cores created and existing in the system with different names -- to get a CoreHandle to these, you construct your core handle with the name of the core you want to control.
maybe i'm being daft but i can't find any methods which enable you to get or set the name.

Since i couldn't get the name, I tried getting a corehandle using a token returned from api->core_create()

code:

#define OTHERCORE 1 //main core's value is 0
svc_mediaCoreI *copyCore;
copyCore = castService<svc_mediaCoreI>(api->service_enumService(WaSvc::MEDIACORE, OTHERCORE));
//^^^this is basically all one needs to use the core.

//Is the following code OK?
CoreToken ct = api->core_create();
copyCore->setCoreToken(ct);
CoreHandle testCore(ct);

//the following code doesn't work. >:(
testCore.setNextFile("file:D:\\test.mp3");
testCore.setVolume(100);
testCore.play();

//this however does work :)
/*
copyCore->setNextFile("file:D:\\test.mp3");
copyCore->setVolume(100);
copyCore->start();
/*



I traced the calls thru CoreHandle and it seems that the functions just pass the calls on to UserButtons :(

So I guess my next question is how do I link buttons to a core?
Also, what is the definition of a core? Does the definition imply that it has a gui attached?
Ilitirit is offline  
 
Go Back   Winamp & Shoutcast Forums > Winamp3 > Wasabi Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump