dyplayer
dyplayer copied to clipboard
Using the DYPlayer as an instance in another object instance
Hi, in an arduino sketch on Platformio, I'm trying to create an instance of the DYPlayer in an ohter instance.
I am using Nano Every and the DYPlayerArduino.h
Exemple:
> class AudioPlayer
> {
> private:
> DY::Player _dyPlayer;
> public:
> Player(Stream *serial):_dyPlayer(serial){}
> };
Then in the main sketch I'm using:
AudioPlayer(&Serial) ;
ou
AudioPlayer(&SoftSerial)
but I keep having those messages at compile:
no instance of constructor "DY::Player::Player" matches the argument list argument types are: (arduino::Stream ) conversion` from 'arduino::Stream' to 'const DY::Player' is ambiguous
Do you think it's possible to fix this ? Thank you !