jean.renaud.lrs
8th September 2008, 21:52
I'm working on a way to use input modules (in_*.dll) with a third-party software to decode all the sound files types known.
By using exported API winampGetInModule2 and extracting in_module and out_module structs, I can Play, Pause, Stop, GetOutputTime and Seek, but i'm also trying to find a way to get total time of the sound.
The function "void (*GetFileInfo)(const in_char *file, in_char *title, int *length_in_ms)" from "in_module" seems to be the right one, but if i call it before playing the sound, the value of "length_in_ms" returned is 0 or -1. The only way to obtain the real value is to get it while playing the sound.
Is there something I make wrong ? The input plugin successfully opens, so it should work...
I'm also trying to understand why the value of GetOutputTime will never reach the maximum value of GetLength while playing. It stops tenths of a seconds before.
By using exported API winampGetInModule2 and extracting in_module and out_module structs, I can Play, Pause, Stop, GetOutputTime and Seek, but i'm also trying to find a way to get total time of the sound.
The function "void (*GetFileInfo)(const in_char *file, in_char *title, int *length_in_ms)" from "in_module" seems to be the right one, but if i call it before playing the sound, the value of "length_in_ms" returned is 0 or -1. The only way to obtain the real value is to get it while playing the sound.
Is there something I make wrong ? The input plugin successfully opens, so it should work...
I'm also trying to understand why the value of GetOutputTime will never reach the maximum value of GetLength while playing. It stops tenths of a seconds before.