Commit Graph

24 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 7ad0a1447f ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12212
2020-12-14 12:34:23 -03:00
Mike Blumenkrantz 8e5625dbe6 ecore/audio: add a couple more functions to the pulse callback struct
to be used later

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11528
2020-03-25 22:13:04 +01:00
Marcel Hollerbach 680285bf6e ecore-audio: make this a Efl_Object
sorry for the late fixup, the Ecore_Audio_Object is documented as "the
audio object" however, it is not, internally it is used as struct, thus
gdb gets confused.
2018-06-19 18:31:32 +02:00
Marcel Hollerbach 10ac0c6036 ecore_audio: add back function that is stable
this function was removed, but should not have been removed.

Differential Revision: https://phab.enlightenment.org/D6330
2018-06-19 15:45:33 +02:00
Carsten Haitzler b63d64bda2 ecore audio - add comment that this is an intended leak... 2018-04-06 22:40:33 +09:00
Carsten Haitzler 35a6e7a6d2 ecore audio - dont unload modules etc. in case audio obj around on exit
if audio objects are around after ecore_audio has been shut down then
they may access the sndfile or pulse lib ptrs/funcs and thus dont
unload these. should fix crashes on shutdown.
2018-04-06 17:08:44 +09:00
Carsten Haitzler ce0ea3c297 ecore_audio - only complain once about not loading pulse/sndfile
otherwise we get a complaint for everty time some audio needs/wants to
play and that's just noisy and ugly, so only do it once - the first
time sndfile/pulse are being loaded and it fails.
2018-01-12 22:32:39 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Jean Guyomarc'h 57f95de890 ecore_audio: use the correct module wrapper
This was code for sndfile. sndfile module should have been
used instead of the pulseaudio one.
It led to a build break when having sndfile but not pulseaudio.

Ref: 879d93377b
2016-08-02 21:12:33 +02:00
Carsten Haitzler 879d93377b efl runtime dynamic lib loading - make errors consistent and useful
so drop trying to appease the openbsd packages and stick to "upstream
so major versions" and let users fix their systems with symlinks. also
report what we are looking for so they have a chance to symlink to
make efl happy.

at some point we should make a single simple runtime lib linker
subsystem in efl so all these errors are reported in the same way,
input libray names are listed in a simple consistent way etc. etc.

for now we have 3 locations in efl that do this and they are roughly
similar. we can unify it later.
2016-08-02 11:23:34 +09:00
Carsten Haitzler d27f5fcab7 ecore_audio - save 232k of real RAM by dlopening depednecies
so libpuls and libsndfile suck in dependencies. they suck in so much
that by the time linking is done we've written to about 230kb of
PRIVATE MEMORY as dirty pages in symbol tablesm global veriables etc.
etc. - this is just horrible. especially if an app never makes any
sound... it's just wasted memory. this stuff is invisible to normal
memory debug tools. so this begins to address things. please see
T4227. my numbers now put me at:

1780Kb total dirty writable mapped from library file pages. down from
2012Kb.

This fixes some memory bloat reported in the above ticket, but there
is more to fix for sure.

@fix
2016-08-01 14:41:15 +09:00
Rafael Antognolli 70e882cefb Revert "ecore_audio: Remove old structs that we don't need anymore"
This reverts commit 96d9869684.
2013-05-03 17:44:01 -03:00
Daniel Willmann 96d9869684 ecore_audio: Remove old structs that we don't need anymore
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-05-03 17:04:11 +01:00
Daniel Willmann 2d85906367 ecore_audio: Fix warnings
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:34:33 +01:00
Daniel Willmann 48b78234a8 ecore_audio: Build Eo-based Ecore_Audio and tests now
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:12:17 +01:00
Daniel Willmann 4d318ba913 ecore_audio: Implement speed get/set functions
You can now change the playback speed of an input

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-02 16:26:47 +01:00
Daniel Willmann 75aa9118d0 ecore_audio: Rename ecore_audio_*_userdata_{get,set} userdata -> data
As mentioned by Cedric *_data_set is used in other places of EFL
already.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-02 16:21:44 +01:00
Cedric BAIL 2063e4353d efl: integrate eina_log_timing. 2013-03-27 21:43:45 +09:00
Daniel Willmann eb15fa9e9c ecore_audio: Add rudimentary ALSA support
By rudimentary I mean I barely got it to work. For my particular test
case. It will not work for you and needs lots of love until it can be
used.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 80999
2012-12-14 23:38:21 +00:00
Daniel Willmann d49fe90b18 ecore_audio: Add support for adding a custom callback
Very hackish implementation and probably not needed as libsndfile
virtual IO can be used instead, though it's a little more complicated

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 80998
2012-12-14 23:38:18 +00:00
Daniel Willmann 94ccfd45e8 ecore_audio: Add support for simple tone output
Just plays a sine wave of set frequency and duration

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 80997
2012-12-14 23:38:14 +00:00
Daniel Willmann 8c96a841e4 ecore_audio: Add support for libsndfile
Allows reading from and writing to wav, ogg, etc. files. Support for
virtual IO as well to allow playing sounds from eet, which will be
needed in edje multisense.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 80996
2012-12-14 23:38:11 +00:00
Daniel Willmann 9293581c62 ecore_audio: Add support for PulseAudio
Only outputs are supported at the moment

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 80995
2012-12-14 23:38:08 +00:00
Daniel Willmann 318a88b61f efl: Introducing ecore_audio - the audio API for efl
This is still very much a work in progress, so expect some issues. The
signalling is using ecore events for now - that will change to callbacks
you can register callbacks for events on specific Ecore_Audio_Objects.
EO wasn't there when Ecore_Audio started, but it will probably move to
that in the future.

Otherwise have fun, don't break it (too much) and please send bug
reports and feedback to me.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 80994
2012-12-14 23:38:01 +00:00