GEInterfaces.h 660 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) 2011 Nokia Corporation.
  3. *
  4. * Part of the Qt GameEnabler.
  5. */
  6. #ifndef GEINTERFACES_H
  7. #define GEINTERFACES_H
  8. #include <QObject>
  9. namespace GE {
  10. #define AUDIO_FREQUENCY 22050
  11. #define AUDIO_SAMPLE_TYPE short
  12. #define AUDIO_SAMPLE_BITS 16
  13. // Constants
  14. const float GEMaxAudioVolumeValue(4096.0f);
  15. class AudioSource : public QObject
  16. {
  17. Q_OBJECT
  18. public:
  19. explicit AudioSource(QObject *parent = 0);
  20. virtual ~AudioSource();
  21. public:
  22. virtual bool canBeDestroyed();
  23. virtual int pullAudio(AUDIO_SAMPLE_TYPE *target, int bufferLength ) = 0;
  24. };
  25. } // namespace GE
  26. #endif // GEINTERFACES_H