Show
Ignore:
Timestamp:
05/13/09 10:40:10 (6 years ago)
Author:
robert
Message:

Rearranged static SDL callback so that it's after the SDL.h header.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgmovie/osgmovie.cpp

    r10190 r10193  
    336336        virtual bool playing() const { return _playing; } 
    337337 
    338         static void soundReadCallback(void * user_data, uint8_t * data, int datalen); 
    339338 
    340339        bool                                _playing; 
     
    604603#include "SDL.h" 
    605604 
     605static void soundReadCallback(void * user_data, uint8_t * data, int datalen) 
     606{ 
     607    SDLAudioSink * sink = reinterpret_cast<SDLAudioSink*>(user_data); 
     608    osg::ref_ptr<osg::AudioStream> as = sink->_audioStream.get(); 
     609    if (as.valid()) 
     610    { 
     611        as->consumeAudioBuffer(data, datalen); 
     612    } 
     613} 
     614 
    606615SDLAudioSink::~SDLAudioSink() 
    607616{ 
     
    643652} 
    644653 
    645 void SDLAudioSink::soundReadCallback(void * const user_data, Uint8 * const data, const int datalen) 
    646 { 
    647     SDLAudioSink * sink = reinterpret_cast<SDLAudioSink*>(user_data); 
    648     osg::ref_ptr<osg::AudioStream> as = sink->_audioStream.get(); 
    649     if (as.valid()) 
    650     { 
    651         as->consumeAudioBuffer(data, datalen); 
    652     } 
    653 } 
    654654 
    655655#endif