File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 3
3
#include "allegro5/internal/aintern_acodec_cfg.h"
4
4
#include "acodec.h"
5
5
6
+
7
+ /* globals */
8
+ static bool acodec_inited = false;
9
+
10
+
6
11
/* Function: al_get_allegro_acodec_version
7
12
*/
8
13
uint32_t al_get_allegro_acodec_version (void )
@@ -61,8 +66,18 @@ bool al_init_acodec_addon(void)
61
66
ret &= al_register_audio_stream_loader_f (".mp3" , _al_load_mp3_audio_stream_f );
62
67
#endif
63
68
69
+ acodec_inited = ret ;
70
+
64
71
return ret ;
65
72
}
66
73
67
74
75
+ /* Function: al_is_acodec_addon_initialized
76
+ */
77
+ bool al_is_acodec_addon_initialized (void )
78
+ {
79
+ return acodec_inited ;
80
+ }
81
+
82
+
68
83
/* vim: set sts=3 sw=3 et: */
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ extern "C" {
30
30
31
31
32
32
ALLEGRO_ACODEC_FUNC (bool , al_init_acodec_addon , (void ) );
33
+ ALLEGRO_ACODEC_FUNC (bool , al_is_acodec_addon_initialized , (void ) );
33
34
ALLEGRO_ACODEC_FUNC (uint32_t , al_get_allegro_acodec_version , (void ) );
34
35
35
36
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ streamed with [al_load_audio_stream] or [al_load_audio_stream_f].
32
32
33
33
Return true on success.
34
34
35
+ ## API: al_is_acodec_addon_initialized
36
+
37
+ Returns true if the acodec addon has been initialized, otherwise returns false.
38
+
35
39
## API: al_get_allegro_acodec_version
36
40
37
41
Returns the (compiled) version of the addon, in the same format as
You can’t perform that action at this time.
0 commit comments