|
|
#1 |
|
Junior Member
Join Date: May 2001
Posts: 3
|
I'm working on an output plugin and I have three questions: 1) Winamp seems to send strange volume commands to the plugin. After calling Open, it then calls SetVolume and passes it the value '-666' (creepy). I added a check to my volume procedure to see if it was in range, which fixes it, but it's rather odd. It produces this call every single time, immediately after calling Open. 2) Does anyone know exactly what the format is that winamp uses internally (and what is passed to the plugin)? Left-first, little-endian two's complement would be my guess, but I'm not sure. Anyone know? 3) Lastly, winamp doesn't want to call Write in some cases. When I play the demo mp3 that comes with winamp, I have Open return 0 (as if a diskwriter, but currently it dumps the data). In this case, winamp calls CanWrite and the plugin returns 8192 (the max value anyway, afaik), winamp then alternately 'Writes' and calls CanWrite, until the end, when it does a IsPlaying (which returns 0), and then closes. BUT, when I play a 44100hz wav file, winamp never writes anything. It does Open, which again returns 0, then calls CanWrite, but never calls Write. It just calls CanWrite over and over (with the odd GetWritten sprinkled in there, but that always returns 0, since obviously nothing has been written). Any thoughts on these? Thanks in advance. Charlie |
|
|
|
|
|
#2 |
|
Junior Member
|
I have the same behaviour here.
The ugly -666 volume. I guess it's a coder's joke, but... It would be nice to have more documentation about all these functions and parameters. |
|
|
|
|
|
#3 |
|
ist death
Join Date: May 2000
Posts: 3,704
|
1. Yes, we all are satanists and use -666 to mark default volume on playback start. From in_raw.c :
code: 2. Left-to-right, little-endian (Intel), two's complement, unsigned for 8-bit, signed for 16-bit and higher. All sorts of wintel audio software use the same hardware-native formats so there is no need to document them anywhere. 3. Could you post your CanWrite() code ? Looks like what you return is too small. If you are making a diskwriter, Write() can take any amount of data at any time so CanWrite() can return any constant big number (eg. 666666). 8192 is size limit for Write(), but CanWrite() can return more without messing anything up. BTW, you should really study in_raw.c so you can examine the code which calls your functions. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|