i put this code in the OnInit() function of a generic component window. i wouldn't normally do something like this but i couldn't find another way to play two tracks at the same time.
code:
//mediaCore is a pointer to an svc_mediaCore
mediaCore=NULL;
//Get a pointer to the main core.
mediaCore = castService<svc_mediaCoreI>(api->service_enumService(WaSvc::MEDIACORE, 0));
//Set the next file, and play.
mediaCore->setNextFile("file:c:/downloads/test.mp3");
mediaCore->start();
return retval;
Now when I installed this component and opened it in WA3, test.mp3 starts playing. it responds to eq/volume changes (perhaps cos i'm not using dsound?) but not the stop, play, etc buttons.
when i load another mp3 in winamp both of them play! and both respond to the "seeker". only the one i opened "legally" responds to stop/play/pause though.
i noticed that svc_mediaCore has a setToken(CoreToken) method. Does this imply that a mediaCore can only be tied to one core?