Commit Graph

173 Commits

Author SHA1 Message Date
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Carsten Haitzler 90e186a0c8 ecore_audio wasapi - fix ecore win32 handler deletion and destruction
vtorri pointed this out in T6607. this should fix this.

fixed T6607

@fix
2018-01-13 14:46:08 +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
Carsten Haitzler 368e0c5d8f ecore_audio - don't about destruction because of failed sndfile load
this means objetcs are only partly destroyed and that is wrong.

@fix
2018-01-12 22:32:39 +09:00
Ivan Furs 97f79344da ecore_audio: fix using undefined macros
Summary: @T6154

Reviewers: vtorri, cedric, NikaWhite, raster

Subscribers: artem.popov, vtorri, jenkins, cedric, jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D5310

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Cedric BAIL 53c548a97e Revert "Revert "ecore_audio: a minimal template for playing sound on WINDOWS is added""
This reverts commit 4457f8c9c8.
2017-12-13 10:27:48 -08:00
Prince Kumar Dubey 68a455d10c ecore_audio: unused variables are removed to fix warning.
Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5302

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:09:12 -07:00
Carsten Haitzler 4457f8c9c8 Revert "ecore_audio: a minimal template for playing sound on WINDOWS is added"
This reverts commit 7a98f617e9.

this commit breaks compiling things against efl badly. i'm on holiday
and haver only a mini screen and keyboard wwith me so any serious wok
in hunting these issues isn't going to be fun or easy. as this causes
bad build brreaks this is worth a revert IMHO. please re-submit wwhen
you've tested against efl by building things against it. also our
public headers just should not have such ifdefs/if's that change api
presented based on how efl is cnfigured. we expose the same api and
macros and types regardless of internal config.
2017-10-07 19:09:53 +09:00
Ivan Furs 7a98f617e9 ecore_audio: a minimal template for playing sound on WINDOWS is added
Summary:
Realization of audio data playback through WASAPI (Windows Audio Session API).(minimal)
WASAPI model:
1. Find  a playback device (in the default system)
2. Register the client on the playback device.
3. Create a playback format for audio data.
4. Initialize the client with the created format, and access mode,  ....
5. Take the object-rendering from the client for play the data stream.
6. Play data stream

ecore_audio model:
1. create a object for play the data stream(out object)
2. create a object to receive the data stream(in object)
3. register in the out-object the in-object
4. play data stream

Necessary:
Realize the ecore_audio object to play the data stream using the WASAPI model.

How implemented:
1. The object ecore_audio_out_wasapi is implemented
2. object ecore_audio_out_wasapi - the object constructor is find a playback device (in the default system)(WASAPI)
3. _ecore_audio_out_wasapi_ecore_audio_out_input_attach -  register in the out-object the in-object
   3.1 Register the client on the playback device.(WASAPI)
   3.2 Create a playback format for audio data.(WASAPI)
   3.3 Initialize the client with the created format, and access mode,  ....(WASAPI)
4. _write_cb - play data
   4.1  Take the object-rendering from the client for play the data stream.(WASAPI)
   4.2  Play data stream(WASAPI)

Reviewers: cedric, vtorri, raster, an.kroitor, NikaWhite, FurryMyad, rimmed, t.naumenko, Jaehyun, bowonryu

Reviewed By: vtorri, NikaWhite

Subscribers: artem.popov, cedric, jpeg

Tags: #windows

Differential Revision: https://phab.enlightenment.org/D5029

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-10-03 11:36:49 -07:00
Jaehyun Cho db7ed3dcdd ecore_audio_pulse_ml: Check memory allocation fail 2017-08-08 23:13:47 +09:00
Carsten Haitzler 8f67f2f2d3 ecore_audio headers conflict with app have ifdefs
Ecore_Audio.h had #ifdef HAVE_PULSE ... and that is just so wrong as
this is something an ap[p may or may not set in its config.h ... but
this certainly hase no place in our public headers. the api's there
should always be there... symbols always... just imtplementation may
be empty ... though ecore_audio doesnt build at all without pulse...
so it's moot.

so fix this build issue i found when fixing e build issues with meson
changes etc.

@fix
2017-07-22 17:59:11 +09:00
Myoungwoon Roy, Kim 802b547310 docs: Fix typos and some wrong expressions in Ecore, Ecore_Audio, Ecore_Cocoa, Ecore_Con, and Ector API reference doxygen.
Summary: I had fixed some typos and wrong expressions, such as capital letters, $simbols in .eo and singulars in Ecore, Ecore_Audio, Ecore_Cocoa, Ecore_Con, and Ector API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: Jaehyun_Cho, stefan, jpeg, cedric, raster

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D4943
2017-06-07 13:01:13 +09:00
Mike Blumenkrantz 179e89d955 ecore-audio: unset DISPLAY conditionally before processing pulse events
in some cases, pulse events trigger spawning another pulse instance, and
the environment at this time is used to determine whether to attempt an
x11 connection

fix T2599

@fix
2017-06-02 18:23:43 -04:00
Daniel Kolesa 6af8527117 eo: move all the key_ properties to C 2017-04-26 16:19:06 +02:00
Jiwon Kim 25fcdde356 ecore audio: Fix loss of last stream
Summary:
pa_stream's write callback requires to size of stream data
using 'len' parameter.
This size depend on pulse audio's internal status and not
consistent.

When a efl read audio's last stream, length of read('bread')
is less than write callback's 'len' parameter.
If the gap between 'len' and 'bread' is small,
last stream is played fortunately.
Otherwise, the last stream is discarded.
(It is doubtful about pa_stream's pre-buffering.)

To prevent it, push silent stream which is amount
of deficient length.

@fix T5281

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, jpeg, woohyun

Maniphest Tasks: T5281

Differential Revision: https://phab.enlightenment.org/D4726
2017-03-24 10:34:54 +09:00
Myoungwoon Roy, Kim 62455a8d41 docs: Fix typos and some wrong expressions in Ecore and Edje API reference doxygen.
Summary: I had fixed some typos and wrong expressions, euch as capital letters, singular Etc. in Ecore and Edje API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho, jpeg

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4677
2017-02-27 19:48:38 +09:00
Myoungwoon Roy, Kim 01931c4676 doxygen: Fix typos & invalid statements in ecore
This covers ecore audio, avahi, buffer and con.

Summary: There are some typos and cacologigue statements in
doxygen of ecore_audio, ecore_avahi, ecore_buffer, and ecore_con.

Test Plan: API Doxygen Revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho

Subscribers: jpeg, conr2d

Differential Revision: https://phab.enlightenment.org/D4652
2017-02-13 19:54:29 +09:00
Daniel Kolesa cb3f8304e0 eolian: change eo file syntax @virtual_pure -> @pure_virtual 2017-01-13 15:44:09 +01:00
Daniel Kolesa 85fbc333dd eolian: enforce specification of both get and set in prop impls
Now you can't use the same syntax as you would for a method to
implement a property as whole, instead you need to specify the
getter and/or setter explicitly. This is to allow parent classes
to expand their properties without altering behavior of the child
classes.
2017-01-11 16:38:41 +01:00
Daniel Kolesa 4cb3d22bb2 ecore audio: use new property impl syntax 2016-12-27 17:00:05 +01:00
Stefan Schmidt acba97cd04 docs: ecore_adio: finish up eo docs for ecore_audio 2016-11-11 09:26:22 +01:00
Daniel Kolesa a8f240e10d ecore_audio, eio eo: remove pointers 2016-11-04 17:14:30 +01:00
Stefan Schmidt 42426735e8 docs: ecore: document various type defines 2016-11-03 11:57:40 +01:00
Carsten Haitzler d79232d605 ecore audio - fix hang in wayland due to pulse audio connecting to x
pulse insists on connecting to the xserver on init/setup context if:

1. DISPLAY is set
AND
2. DISPLAY is not empty

so to do a pretty horrible worka-round, empty off the display if its
set so pa doesnt go connect to x and do this if WAYLAND_DISPLAy is set
assuming we'll use wayland then. this is far better than a solid
rock-hard hang. :)

@fix
2016-10-31 19:53:34 +09:00
Cedric Bail ca766aa4c5 ecore_audio: deprecating enum is apparently not supported in every version of gcc. 2016-10-30 15:49:54 -07:00
Jean Guyomarc'h 403b0ecfa6
ecore_audio: drop support for CoreAudio on macOS
CoreAudio support was initially introduced by commit
62e29b39f4 as an experimental feature.

It played basic sounds, but suffered from drawbacks: it was controlling
the master channel, and therefore any sound played by ecore_audio would
shut down a previous sound (e.g. background music) for the time of the
sound being played. So that wasn't exactly great... Also, after some
time, some hangs have been reported when playing a sound on input. Most
of the time, it translated as a pause in the main loop (see T3797).
More recently (several months ago), ecore_audio with CoreAudio stopped
working during 1.19 development...

So... CoreAudio support on macOS has never been great. And now it's fully
broken. Instead of trying to revive the thing, let just use PulseAudio.
PulseAudio can be installed without any trouble on macOS thanks to
package managers such as Homebrew. Actually, the efl package provided by
Homebrew already provides PulseAudio as a dependency. And it actually
just works very fine. Dropping CoreAudio seems therefore a nice option:
removes unmaintained code, fixes bugs, and add features.
2016-10-29 23:01:38 +02:00
Stefan Schmidt 1ed2b0fbde docs: document all missing enums
With this commit we reach 100% enum doc coverage. The fields in the enums are
still at 91%, but there is progress on that front as well.
2016-10-25 16:08:25 +02:00
Stefan Schmidt ef814db490 docs: harmonise use of enum sentinel description in eo files 2016-10-25 16:08:24 +02:00
Vitor Sousa f02ff462e7 efl callbacks: update some events calls to no longer trigger legacy callbacks 2016-08-30 13:59:59 -03:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03: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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre 28c917836c efl: Cleanup some code (return values)
This removes some useless code in various places, where the
switch from eo_do() to standard function call was not properly
refactored.

This changes:

type ret = 0;
ret = my_eo_function();
return ret;

To:

return my_eo_function();
2016-08-05 10:32:30 +09: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
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Benjamin Jacobs 1ad2a2bd52 ecore_audio: uncondionally include libgen.h.
Basically everyone should have it.  If not, maybe we should consider
to test the value of _POSIX_C_SOURCE before testing platform specific
defines, or adding a feature check.

Fixes the following warning on DragonFlyBSD:

lib/ecore_audio/ecore_audio_obj_out_pulse.c:282:60: warning: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
        class_vars.context = pa_context_new(class_vars.api, basename(argv[0]));
	                                                            ^
lib/ecore_audio/ecore_audio_obj_out_pulse.c:282:60: warning: passing argument 2 of 'pa_context_new' makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/local/include/pulse/pulseaudio.h:29:0,
                 from lib/ecore_audio/ecore_audio_private.h:17,
                 from lib/ecore_audio/ecore_audio_obj_out_pulse.c:18:
/usr/local/include/pulse/context.h:172:13: note: expected 'const char *' but argument is of type 'int'
 pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
             ^

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 12:05:43 -07:00
Jean Guyomarc'h 7bb32abf33 ecore_audio: remove useless eo data in core audio 2016-06-05 12:12:02 +02:00
Daniel Kolesa b1946ca5d6 eolian: utilize the new void_ptr builtin across eo files
This lets me narrow down the remaining cases of pointers across the EFL.
The void pointers will later need to be reevaluated on per-case basis and
replaced appropriately where possible/feasible.
2016-06-02 13:00:26 +01:00
Daniel Kolesa 6fc482aa9b eolian: utilize the new builtin string type across eo files 2016-05-31 16:05:43 +01:00
Daniel Kolesa e984e5a11a eolian: remove pointers from complex and class types
Complex types (i.e. list, array, hash, accessor etc.) now do not require
pointers with them anymore (the pointer is implied) and the same goes for
class handles. Eolian now explicitly disallows creating pointers to these
as well. This is the first part of the work to remove pointers from Eolian
completely, with the goal of simplifying the DSL (higher level) and therefore
making it easier for bindings (as well as easier API usage).

@feature
2016-05-23 15:58:33 +01:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Carsten Haitzler 43661180f7 efl - key/data/value/obj attach to eo objects - make these properties
the key data now is a property so they come out in bindings really
nicely like:

  obj.key_data["blah"] = x;

  x = obj.key_data["blah"];

etc.
2016-05-18 02:02:45 +09:00
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.

@feature
2016-05-17 17:50:43 +01:00
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Daniel Kolesa 7e94eb22b4 eolian: mark pure virtual funcs outside of implements
This is a better syntax and should've been like this in the first place.
2016-05-12 16:15:24 +01:00
Tom Hacohen 05c01867b6 Ecore audio: Correctly namespace now that Eolian supports it better.
Eolian had a restriction due to the C++ generator that classes and
namespaces would be named differently. Now that the C++ generator is
fixed, eolian dropped the restriction and we can finally fix the wrong
namespaces in ecore audio.
2016-05-10 11:36:35 +01:00
Chris Michael cf7cf35c3c ecore-audio: Fix issue of improper deleting of ecore_job
This patch fixes a compiler warning where eo_del was being called on
an Ecore_Job.

ref c1141c7b0b

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-04 11:40:29 -04:00