Free Electron
VoiceI.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __audio_VoiceI_h__
8 #define __audio_VoiceI_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Sound producer
16 
17  @ingroup audio
18 *//***************************************************************************/
19 class FE_DL_EXPORT VoiceI:
20  virtual public Component,
21  public CastableAs<VoiceI>
22 {
23  public:
24 
25 virtual Result setReferenceDistance(Real distance) =0;
26 virtual Result setLocation(const SpatialVector& location) =0;
27 virtual Result setDirection(const SpatialVector& direction) =0;
28 virtual Result setVelocity(const SpatialVector& velocity) =0;
29 virtual Result setPitch(F32 pitch) =0;
30 virtual Result setVolume(F32 volume) =0;
31 
32 virtual Result play(void) =0;
33 virtual Result pause(void) =0;
34 virtual Result stop(void) =0;
35 virtual Result rewind(void) =0;
36 
37  /// @brief Add another sound to be played in order
38 virtual Result queue(String name) =0;
39 
40  /// @brief Play current sound repeatedly
41 virtual Result loop(BWORD on) =0;
42 
43  /// @brief Continue playing without external references
44 virtual Result persist(BWORD on) =0;
45 
46  /// @brief Return number of sounds playing or pending
47 virtual I32 remaining(void) =0;
48 };
49 
50 } /* namespace ext */
51 } /* namespace fe */
52 
53 #endif /* __audio_VoiceI_h__ */
54 
Sound producer.
Definition: VoiceI.h:19
kernel
Definition: namespace.dox:3
Automatically reference-counted string container.
Definition: String.h:128
Result
Generalized return value indicating success or failure, and why.
Definition: Result.h:24
Base for all interfacable components.
Definition: Component.h:20
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192