Phonon::mediaObject - searching for a possibility to get the audio length
-
I am hardly searching for a solution of getting the audio length for my MediaObject in C++.
I tried: long len = Phonon::mediaObject->totalTime();
It gives me always the value -1 (Ideas to handle it? I put it after the play-button so it should be in the "LoadingState".I also tried totalTimeChanged it gives me the error: no matching function for call to 'Phonon::MediaObject::totalTimeChanged()'
Do you have any ideas or better solutions to get the audio file length?
-
I am hardly searching for a solution of getting the audio length for my MediaObject in C++.
I tried: long len = Phonon::mediaObject->totalTime();
It gives me always the value -1 (Ideas to handle it? I put it after the play-button so it should be in the "LoadingState".I also tried totalTimeChanged it gives me the error: no matching function for call to 'Phonon::MediaObject::totalTimeChanged()'
Do you have any ideas or better solutions to get the audio file length?
@serendipity2 said in Phonon::mediaObject - searching for a possibility to get the audio length:
totalTimeChanged
this is a signal, you don't call it like a function, instead you connect a slot to it.
-
I am hardly searching for a solution of getting the audio length for my MediaObject in C++.
I tried: long len = Phonon::mediaObject->totalTime();
It gives me always the value -1 (Ideas to handle it? I put it after the play-button so it should be in the "LoadingState".I also tried totalTimeChanged it gives me the error: no matching function for call to 'Phonon::MediaObject::totalTimeChanged()'
Do you have any ideas or better solutions to get the audio file length?
@serendipity2 Also it has a parameter: void totalTimeChanged (qint64 newTotalTime)