I\'m trying to use a C# class that wraps C++ native api into CLI C# class. It seems that there are some problems (it really near to be working) and would like some help to f
You are miscasting the returned value. Most of the functions return dz_error_t
(you can find the enum values in deezer-object.h) the enum CONNECT_EVENT_TYPE
is mapped on dz_connect_event_t
.
I would suggest to create a new enum mapped on dz_error_t
and cast with this new enum.
Moreover, as described in http://developers.deezer.com/sdk/native (Section Playing a song) for the moment only DZ_TRACKLIST_AUTOPLAY_MANUAL
is supported. So I would suggest to change the dz_player_play
call into:
dz_player_play(libcPlayerHndl, IntPtr.Zero, IntPtr.Zero, cmd, TRACKLIST_AUTOPLAY_MODE.MANUAL, idx);
and dPlayer.Play
into:
dPlayer.Play(0, PLAYER_COMMANDS.START_TRACKLIST);
If you still have an issue, please also post the traces returned by your application.
Do you have files created in the path provided by ccUserProfilePath
?
If you still have an issue, be sure you have right to play the song by trying to play it with your Internet browser at this address http://www.deezer.com/track/97206076.
Regards,
Cyril