cloudofoz / raylib-media

Clean and user-friendly extension for raylib that adds seamless audio and video streaming support via the FFmpeg libav* libraries. It enables easy integration of multimedia content into raylib applications, providing direct access to video textures and audio streams, with support for seeking and looping.
zlib License
47 stars 1 forks source link

Can't compile - undeclared functions? #2

Open geajack opened 3 hours ago

geajack commented 3 hours ago

Hi! Cool looking project.

Right now I can't compile this due to a number of "undeclared function" errors:

src/rmedia.c:940:6: error: call to undeclared function 'IsAudioStreamReady'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  940 |         if (IsAudioStreamReady(media->audioStream))
      |             ^
src/rmedia.c:946:5: error: call to undeclared function 'IsTextureReady'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  946 |         if(IsTextureReady(media->videoTexture))
      |            ^
src/rmedia.c:987:7: error: call to undeclared function 'IsAudioStreamReady'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  987 |                         if(IsAudioStreamReady(media.audioStream))
      |                            ^
src/rmedia.c:995:8: error: call to undeclared function 'IsAudioStreamReady'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  995 |                         if (IsAudioStreamReady(media.audioStream)) 
      |                             ^
src/rmedia.c:1007:8: error: call to undeclared function 'IsAudioStreamReady'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1007 |                         if (IsAudioStreamReady(media.audioStream)) 
      |                             ^
src/rmedia.c:1759:6: error: call to undeclared function 'IsAudioStreamReady'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1759 |         if (IsAudioStreamReady(media->audioStream))
      |             ^

As far as I can tell the declarations and implementations of these functions don't appear at all in this repository - is there maybe a file missing or something?

geajack commented 3 hours ago

Ah, I see - those are Raylib 5.0 functions. I'm using the latest raylib commit and it seems all of the ...Ready functions have been renamed to ...Valid.

I could make a PR that fixes it if you like, but you might not want it - the rename is a Raylib 5.5 thing I think, so not official yet.