I have an iOS cocos2d-iphone app in the app store which is all well and good but I am trying to port it to Windows Phone 8 by basically copying and pasting the Objective-C code into each method and writing the Cocos2d-x C*+ equivalent.
I have added the mp3 file in the exact same place as where it picking up and showing image files in CCSprites…
It throws this exception
throw ref new Platform::FailureException;
Msvcr110d.dll!_CxxThrowException Line 152 C*+
CocosDenshionWindowsPhone.dll!MediaStreamer::ReadData(Platform::String ^ filename) Line 71 C*+
CocosDenshionWindowsPhone.dll!MediaStreamer::Initialize Line 108 C*+
CocosDenshionWindowsPhone.dll!Audio::PreloadSoundEffect(const char * pszFilePath, bool isMusic) Line 505 C*+
CocosDenshionWindowsPhone.dll!Audio::PlaySoundEffect Line 288 C*+
CocosDenshionWindowsPhone.dll!CocosDenshion::SimpleAudioEngine::playEffect(const char * pszFilePath, bool bLoop) Line 126 C++
I swear, that I have double, triple checked the file name, messed around with paths and renaming the file and all things I can think of but it still fails to open the file… and the file is definitely in the Assets directory.
Note that it converts it (successfully) from standard ASCII c string to unicode when going from PreloadSoundEffect to Initialize