You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.1 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "ffplaymod.h"
  2. #include "appmain.h"
  3. extern appMain* aMain;
  4. ////////////////////////////////////////////////////////////////////////////////
  5. ////////////////////////////////////////////////////////////////////////////////
  6. // Embody of ffplaymod audio open.
  7. int ffplaymod_port_audio_buffersize()
  8. {
  9. if ( aMain != NULL )
  10. {
  11. return aMain->GetAudioBufferSize();
  12. }
  13. return 1024;
  14. }
  15. int ffplaymod_port_audio_open( int channels, int rate )
  16. {
  17. if ( aMain != NULL )
  18. {
  19. return aMain->SetupAudio( channels, rate );
  20. }
  21. return -1;
  22. }
  23. int ffplaymod_port_audio_close()
  24. {
  25. if ( aMain != NULL )
  26. {
  27. return aMain->CloseAudio();
  28. }
  29. return -1;
  30. }
  31. void ffplaymod_port_content_size( int width, int height )
  32. {
  33. if ( aMain != NULL )
  34. {
  35. aMain->setRenderSize( width, height );
  36. }
  37. }
  38. void ffplaymod_port_content_title( const char* title )
  39. {
  40. if ( aMain != NULL )
  41. {
  42. Fl_Double_Window* aWin = aMain->getwindow();
  43. if ( aWin != NULL )
  44. {
  45. aWin->label( title );
  46. }
  47. }
  48. }